> Your example however has an interesting problem. What if a > customer has 2 relationships with Address: visitor and > billing address?
In that case, we specify which attribute in the Customer object is the "graft point". Ala: customerQuery.AddJoin(Customers.Attributes.ShipAddress, Address); We also can supply aliases to support multiple joins to the same table. > Interesting, do you move the Addresses.State = 'MO' to the WHERE > clause if the joins need to be LEFT JOIN's in the case of weak > relationships? Our generic query doesn't AUTOMATICALLY support left joins, because it's primary purpose is to represent owning and containing relationships. In this case, we use an AddJoin clause, specifying the weak join. In that case, it's up to the developer to handle the correct join order and alias assignment. We DO move up the where clause elements for any simple comparisons (no LIKE, no IN, essentially). It can make a HUGE difference where the clause is applied, so the control is explicitly available if needed. Marc =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com