DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
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.

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 made changes - 19/Jan/12 03:46 PM
Field Original Value New Value
Project DataNucleus API JPA [ 10171 ] DataNucleus Core [ 10143 ]
Affects Version/s 2.0.1 [ 10835 ]
Affects Version/s 2.0.0.release [ 10703 ]
Affects Version/s 2.0.0.release [ 10735 ]
Affects Version/s 2.0.1 [ 10834 ]
Component/s Persistence [ 10200 ]
Component/s Persistence [ 10181 ]
Andy Jefferson added a comment - 19/Jan/12 03:49 PM
SVN trunk has a fix that results in the test passing

Andy Jefferson made changes - 19/Jan/12 03:49 PM
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 3.0.6 [ 11420 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 06/Feb/12 10:13 AM
Status Resolved [ 5 ] Closed [ 6 ]