I'm using nested entity groups in an HRD google app engine datastore.
A < B < C considering X < Y means that X is parent of Y
Are all C in the same entity group (A one) ?
I want to query all the C which have the same parent A. How would I do it?
This is failing: SELECT * FROM C WHERE ANCESTOR IS Key('A',1)
Any tip?
The test has been done directly in GQL in the datastore, regardless, I attach the snippet of code (Ofy4 code):
That is A:
@Entity
@Cache
public class Site implements Serializable {
private static final long serialVersionUID = 8611281648072797702L;
@Id
private Long id;
private String url;
...
}
That is B:
@Entity
@Cache
public class Accom implements Serializable, HasCapacity {
@Id
private Long id;
@Parent
private Key<Site> site;
...
}
That is C:
@Entity
@Cache
public class Room implements Serializable, HasCapacity {
@Id
private Long id;
@Parent
private Key<Accom> accom;
...
}