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)

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 Store MongoDB

Persist of bidirectional relation using IDENTITY strategy will persist incorrectly

Created: 05/Nov/11 10:56 AM   Updated: 09/Dec/11 03:14 PM   Resolved: 06/Nov/11 03:04 PM
Component/s: Persistence
Affects Version/s: 3.0.0.release, 3.0.1, 3.0.2, 3.0.3
Fix Version/s: 3.0.4

 Description  « Hide
If we have a 1-1 or 1-N bidir relation and we persist it, the first object will try to persist which will force the persist of the related object(s), and in turn the original object. This works fine for most cases, except when using IDENTITY strategy, since the identity is not set at persist so the related object property cannot be set yet.

Need to change the persistence process to check if using IDENTITY (in the first object) and have a bidir relation. In that case we should then persist the first object partially, then the second one, then go back and update the first one.

Andy Jefferson added a comment - 06/Nov/11 03:04 PM
SVN trunk fixes this

Andy Jefferson made changes - 06/Nov/11 03:04 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 3.0.4 [ 11367 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 09/Dec/11 03:14 PM
Status Resolved [ 5 ] Closed [ 6 ]