The following entities:
@NodeEntity
class MyEntity{
@GraphId Long graphId;
}
class MyResource extends MyEntity{
@Relationship(type="HAS_CHILD", direction = Relationship.INCOMING)
MyContainer parent;
}
class MyContainer extends MyResource{
@Relationship(type="HAS_CHILD", direction = Relationship.OUTGOING)
List<MyResource> children = new ArrayList<>();
MyResource additionalChild;
}
created this graph
MyContainer{
additionalChild=MyResource{graphId=null, name='anotherChild'}
children=[
MyResource{graphId=null, name='child1'},
MyResource{graphId=null, name='child2'}
]
}
loading it back gives:
MyContainer{
additionalChild=MyResource{graphId=95, name='anotherChild'}
children=[
*MyResource{graphId=95, name='anotherChild'},*
MyResource{graphId=97, name='child2'},
MyResource{graphId=96, name='child1'}
]
}
Somehow additionalChild bleeds over into the children collection.
Full example is on Github
<https://github.com/m2spring/ogm-eval/tree/single-child-in-children>.
-Max
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.