What if Primary Key needs to handle NULL case?
I've built an object around an existing table that I have no control of and the primary key consists of a TYPE column and a VALUE column. However, the VALUE column allows null. But, if I choose both the Type and Value fields as the primary keys in TopLink for the object when I query one of the objects that contains NULL for VALUE then I get the following error:
The primary key read from the row [DatabaseRow(blah blah blah] during the execution of the query was detected to be null. Primary keys must not contain null.
NULL is allowed for VALUE because in those cases the TYPE is unique by itself.
I can remove the VALUE as a Primary Key, but I'm not sure what the consequences of doing that will be. Will there be any ill effects if the primary key fields are not enough to make the instance unique?