Let us suppose there is some AddressBook class. Inside is a collection of Contacts. What I want to be able to do is say something like this in the query:
from AddressBook as book where book.Contacts.LastName = "Smith"
Where, when the query is fired, my object heiarchy is not broken, and the internal list of contacts inside the AddressBook class is filtered, and returned inside the AddressBook object, instead of being returned along side the book class in some Object[], which would happen with a fetch or a join.
So...I'm confused, I don't see how in the documentation, perhaps I missed it, but I don't see how you can filter internal collections of objects using the query language.
If someone knows a way to do this...or the accepted alternative, please tell me, because some objects with collections may have serveral thousand items in the collection, which I would never want all to appear in the list at once on a query.
Also...perhaps it just hasn't been implemented, but is it possible to use Generics for internal collections yet? Currently I get a casting error if I try to set my "Contacts" list to IList<Contact> inside of the address book class, and I'm forced to use the regular IList instead.
|