openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Cornia" <>
Subject Merge with changes to a primary key?
Date Fri, 11 Jan 2008 22:42:34 GMT
I have a legacy database that has a compound primary key. For example,
Report with a  primary key type ReportId. (which is composed of a long and a
couple of strings.)

If I create a new ReportId, and assign it to a new Report, then call
persist, the entity is saved correctly.

If, on the other hand, I load an existing report, and change one of the
fields on the reportId, the change is not saved when calling flush.

Help! This has me stumped. The updates work on other objects that are not a
primary key field, but it does not work with a compound primary key change.
I am not sure how to code it to save changes to a compound primary key.


View raw message