Hi all,
It seems like i am doing this the wrong way and the datastore is giving me a
hard time making queries.
I've got a my own User class in my application and there is a Book class in
the application.
Now the Book class has an owner and a write attribute.
@Entity
class User {
@Id
private String email;
}
@Entity
class Book {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key key;
private User owner;
private User writer;
}
I want to search the store for all owned books (on the users myPage)
Query query = getEntityManager().createQuery("SELECT b FROM Book b WHERE
b.owner == :owner");
query.setParameter("owner", owner);
List<Book> books = query.getResultList();
Now the datastore is throwing ugly things to me like "Key of parameter value
does not have a parent."
I'm realy lost here. Could anyone explain to me how i could solve this?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" 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-java?hl=en.