I have an existing java application for Google applications that starts with jpa, and now I'm trying to switch to objectification for different purposes.
The current application has the following representation of objects.
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 view in Objectify? I am using objectify4.
I saw @Parent, but it is not possible to load the list of child objects directly when retrieving the parent?
Thank,
Ramesh.V
source
share