Issue Details (XML | Word | Printable)

Key: NUCCORE-804
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Core

Use of @EmbeddedId (composite) and relation fields results in exception

Created: 11/Feb/10 12:24 PM   Updated: 06/Feb/12 10:13 AM   Resolved: 19/Jan/12 03:49 PM
Component/s: Persistence
Affects Version/s: 2.0.0.release, 2.0.1
Fix Version/s: 3.0.6

 Description  « Hide
See test.jpa.general RelationshipsTest where there is a test with @EmbeddedId and with the owning class also having a join table 1-N relation. When the persist is attempted it tries to insert into the join table with null for the owner PK fields. The problem is likely the internally selected objectId class (ObjectIdentity) which doesn't allow for fields that are persistable in their own right. The workaround would be for the user to define their own @IdClass.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 08/Jun/10 03:02 PM
Likely due to the @EmbeddedId class being set with nondurable identity and AppIdObjectIdConsumer doesn't handle that case (needs to use all fields of the class, instead of the PK fields)

Andy Jefferson added a comment - 19/Jan/12 03:49 PM
SVN trunk has a fix that results in the test passing