Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-13-2018 05:09 PM
How to persist relationship between 2 entities with relationship properties..
In java using OGM
12-14-2018 12:19 PM
Balatriven, Look at the OGM manual here (2.4.3) https://neo4j.com/docs/ogm-manual/current/tutorial/#tutorial:annotations:relationship-entities
Your relationship is really a new java Object that defines the @StartNode and @EndNode, along with any other attributes/properties you want to add. The StartNode and EndNode refers to the node labels (java Classes) that use that relationship.
In your java Class that represents the StartNode, add an @Relationship for the set (or attribute ) of RelationshipEntity object(s). OGM draws the graph the way you would expect. Your java code will have to include the necessary code to get() and set() the objects at StartNode and EndNode.
...at least, that's the way I've made it work.
All the sessions of the conference are now available online