Can we interpret No Answer on this one from anybody as a Not Support / Not Interested / Go away? ;-)
If this cannot be supported (?), would it fair to suggest at least decent error handling for null values in @Id attributes? Are any clarifications needed (c.f. initially attached unit test) ? Thanks. -----Original Message----- From: Michael Vorburger [mailto:mvorbur...@odyssey-group.com] Sent: Wednesday, November 11, 2009 6:57 PM To: users@openjpa.apache.org Subject: NULL in @Id columns leads to "disappearing" objects Hello again! We are working with an existing ('legacy') DB schema where columns which are part of a "logical" (there is no physical PRIMARY KEY CONSTRAINT) composed primary key (mapped in JPA via an @IdClass) CAN BE NULL. Neither the JPA Spec nor any OpenJPA documentation says that this is not permitted or requires that all @Id field never be null... ... but OpenJPA "looses" such objects when mapping in ResultSets - i.e. you get Query result Lists containing null elements! Attached is a small test case project, hopefully illustring this well (if the ZIP makes it through the list?). Any ideas how to "work-around" this on the (Open)JPA side (assume I can't do much about the 10 year old legacy schema installed 120 client sites :) ? Can you think of any other mapping approaches than a straightforward @IdClass as shown in the attached example? Otherwise... do you confirm / agree that this is a bug? Easy to fix?? ;) Regards & lot's of thanks for feedbacks, Michael Vorburger ____________________________________________________________ * This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. * Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. * Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. * An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. * If you have received this email in error, please notify the sender immediately and delete the original. ____________________________________________________________ This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. If you have received this email in error, please notify the sender immediately and delete the original.