Hi everybody,
I have started experimenting with AppEngine and I have a quick
question.
I wrote a simple model where documents are arranged in "spaces"
@PersistenceCapable
public class Space
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private String id;
@Persistent(mappedBy = "space")
private List<Document> documents;
...
}
@PersistenceCapable
public class Document
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value
= "true")
private String id;
@Persistent
@Extension(vendorName = "datanucleus", key = "gae.pk-name", value =
"true")
private String name;
@Persistent
private String author;
...
}
After populating the store with some documents in different spaces
created by several authors, I tried to formalise a query that gives me
all the spaces that contain a document created by a given author.
I wrote it like this:
select from mypackage.Space where documents.contains(d) && d.author ==
'foo' variables mypackage.Document d
The query is executed without errors but no results are returned.
What am I missing here? Any hint about what should I modify to get
this query work correctly?
Thanks,
F.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.