Example:
{code} @Entity public class GrandMother {
private String id; private List<GrandChild> grandChildren = new ArrayList<GrandChild>();
@Id @GeneratedValue(generator = "uuid") @GenericGenerator(name = "uuid", strategy = "uuid2") public String getId() { return id; }
public void setId(String id) { this.id = id; }
@ElementCollection @OrderColumn(name = "birthorder") public List<GrandChild> getGrandChildren() { return grandChildren; }
public void setGrandChildren(List<GrandChild> children) { this.grandChildren = children; } } {code}
where GrandChild is an @Embeddable.
Using cypher and without showing any properties, in Neo4j the mapping will be: {code} (:GrandMother:ENTITY) -[:grandChildren]-> (:EMBEDDED: * GrandMother_grandChildren * ) {code}
Probably, the following mapping would make more sense: {code} (:GrandMother:ENTITY) -[:grandChildren]-> (:EMBEDDED: * GrandChild * ) {code}
|