I have an existing google app engine java application runs with jpa and now i am trying to move to objectify for many different purposes.
Current application has the below representation of the entities.
Class Parent{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key key;
@OneToMany(cascade=CascadeType.ALL, mappedBy="parent")
private List<Child> childs = null;
}
Class Child{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key key;
@ManyToOne
private Parent parent;
}
How can i get the above representation in Objectify? I am using objectify4.
I have seen @Parent, but it seems not possible to load the list of child entities directly while fetching a parent?
Thanks,
Ramesh.V
I found solution for my own problem. Here is the code.
https://github.com/rameshv1210/objectify-many-to-one/