Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. @NodeEntity class MyEntity{
  2. @GraphId private Long graphId;
  3. ...
  4. }
  5.  
  6. class MyRoot extends MyEntity{
  7. MyResource resource;
  8. ...
  9. }
  10.  
  11. class MyResource extends MyEntity{
  12. @Relationship(type="HAS_CHILD", direction = Relationship.INCOMING)
  13. private MyContainer parent;
  14. ...
  15. }
  16.  
  17. class MyContainer extends MyResource{
  18. @Relationship(type="HAS_CHILD", direction = Relationship.OUTGOING)
  19. private List<MyResource> children = new ArrayList<>();
  20. ...
  21. }
  22.  
  23. r=MyRoot{children=[MyResource{graphId=null, name='.1'}, MyResource{graphId=null, name='.2'}, MyResource{graphId=null, name='.3'}, children=[MyResource{graphId=null, name='.4.1'}, MyResource{graphId=null, name='.4.2'}, MyResource{graphId=null, name='.4.3'}]]}
  24. ...
  25. 16:52:16.880 [main] DEBUG org.neo4j.ogm.metadata.MetaData - More than one class subclasses org.springdot.ogm.eval.entities.MyEntity
  26. 16:52:16.881 [main] DEBUG org.neo4j.ogm.metadata.MetaData - More than one class subclasses org.springdot.ogm.eval.entities.MyEntity
  27. ...
  28. * MyRoot{children=[]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement