JPA - Nullable column as part of IdClass
I have a table which I'm trying to map w/ JPA. Unfortunately the primary key of this table is a combination of 6 columns, all of which are nullable according to the ddl. In practice, only one of these columns is ever actual nulled.
The problem seems to occur on rows where this column has a null value. In those instances, a standard jpa query will return a null object instead of an object with that column nulled. Also, since this column helps identify the uniqueness of a row, I can't remove it from the primary key. Doing so results in multiple instances of the same object being returned.
I have set this up w/ an @IdClass tag on the main class, 6 @Id annotations in the main class, and an @embeddable class w/ 6 properties (which match the 6 @Id annotations).
Any advice is appreciated.