Issue Details (XML | Word | Printable)

Key: NUCNEOFORJ-26
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

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

Support persistence of Maps

Created: 13/Aug/12 09:19 AM   Updated: 19/Nov/13 10:29 AM   Resolved: 26/Oct/13 03:19 PM
Component/s: Persistence
Affects Version/s: None
Fix Version/s: 3.2.3


 Description  « Hide
We currently don't support persistence of Map fields into neo4j, and that construct doesn't fit naturally with graph DBs. We could support some specific Maps however, for example
1. Map<Non-PC, PC>. This could be persisted as a Node for the Value, and a Relationship between owner Node and value Node, and put the Key as a property on the Relationship.
2. Map<PC, Non-PC>. This could be persisted as a Node for the Key, and a Relationship between owner Node and key Node, and put the Value as a property on the Relationship.

Andy Jefferson added a comment - 26/Oct/13 03:19 PM
SVN trunk now supports the persistence of Map<NonPC,PC> and Map<PC,NonPC>.
In the first case the value is a Node, there is a Relationship from ownerNode to valueNode, and the key is either a field in the value (key.mappedBy != null) or a property on the Relationship.
In the second case the key is a Node, there is a Relationship from ownerNode to keyNode, and the value is either a field in the key (value.mappedBy != null) or a property on the Relationship.

The final map case of Map<PC,PC> remains unsupported : need to think how we would model this - e.g key and value are both Nodes, and we have Relationship where?

Andy Jefferson made changes - 26/Oct/13 03:19 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.2.3 [ 12041 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 19/Nov/13 10:29 AM
Status Resolved [ 5 ] Closed [ 6 ]