Hello! Using subqueries.
See http://ayende.com/Blog/archive/2009/05/19/nhibernate-queries-examples.aspx look for "force a load for the Posts collection" On 15 Juni, 17:45, Tobias Eriksson <[email protected]> wrote: > I have a problem that when creating an alias the sql also returns the > columns of the alias table. > > For example > session.CreateCriteria(typeof (A), "a").CreateAlias("B", "b", > JoinType.InnerJoin).List(); > is fetching all column for both A and B. > > In HQL you can write like this > select a from A a inner join a.B b > > Can you do something similar with criteria? > > There was an earlier discussion about this in this thread, but with no > solutionhttp://groups.google.com/group/nhusers/browse_thread/thread/cc6c61bc7... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
