Guest User

Untitled

a guest
Jun 25th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. @Document
  2. public class Palace {
  3. @Id
  4. private String id;
  5. private Location location;
  6. // getter setter
  7. }
  8.  
  9. public class Location {
  10. private String id;
  11. // getter setter
  12. }
  13.  
  14. {
  15. "_id" : ObjectId("5b05387a8db58e0001d38851"),
  16. "location" : {
  17. "_id" : ObjectId("5ae712d1b2b197000132cd9b"),
  18. }
  19. }
  20.  
  21. {
  22. "_id" : ObjectId("5b05387a8db58e0001d38851"),
  23. "location" : {
  24. "id" : "5ae712d1b2b197000132cd9b",
  25. }
  26. }
  27.  
  28. public class Location {
  29. @Field("id")
  30. private String id;
  31. // additional attributes, getter, setter
  32. }
  33.  
  34. getPalaceByLocationId()
Add Comment
Please, Sign In to add comment