@ManyToMany relationships are not supported in the current version.  
Example Library --- Book

The tutorials suggest that they can be modeled with a List<Key>  
pointing to the other object in each class. When implementing this I  
suspect that this forces an inefficient query to populate the, say  
Set<Book> Library.getBooks() method because I need an IN which is not  
natively supported. Instead I have to get the Extent of all books and  
run through them by hand picking out the books.

The alternative then is to introduce a join class as I would do in a  
SQL schema: e.g. Library --- LibraryBook --- Book. The query then can  
now sort by the foreign key in the join class and filter by minimum  
and maximum key value assuming I'm using Long primary keys.

Comments please on:
1/ Am I right in my thinking

2/ I need a multi-field primary key in the join class based on the two  
foreign keys - is there a nice way of doing this other that making a  
string like this: String key = library.getId().toString()  + '-' +  
book.getId().toString()






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to