Hi there,

I have an entity with something like mapping (basically each entity
represents a book, the key is isbn). Some of the books are related to
others (they are in the same edition, which means that the book title
and author is the same just the print is different - year/hardback/
paperback etc) - basically each entity represents single book. I've
got to properties which I use for the mapping of the editions. Let say
I;ve got three books from the same edition so I have:

Entity 1:

isbn = 111111111111
edition = 111111111111

Entity 2:
isbn = 22222222222
edition = 111111111111

Entity 3:
isbn = 3333333333
edition = 111111111111

So I am able to pick up whole edition in single query (where edition
== 11111111111).

But now I need to do a select for 20 books where each one will
represent one edition. there is no 'group by' in app engine so I've
tried to do something like this:

        Query query = pm.newQuery(Book.class);
        query.setFilter("edition == isbn");

Which doesnt work as well (I guess it expects a parameter for the isbn
with this syntax but can be wrong) and that for gae is comparing two
columns with the entity in the query the same as a join (?).

I Would be really gratefull to solve my issue somehow - I would like
to display last 20 books on title page (and there will be thousands/
millions of them in db so can't filter in business logic).

Many thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to