I don't think Distinct() works for what I am talking about. That seems to add the DISTINCT keyword to the SQL command, but using the DistinctRootEntityResultTransformer() used to take that sql result and when hydrating the entities apply the transformer providing only Distinct entries. I see on the IQuery interface there is a SetTransformer method. Can I get from IQuery to IQueryable?
On Aug 26, 12:23 pm, Diego Mijelshon <[email protected]> wrote: > .Distinct() should do... > > Diego > > On Thu, Aug 26, 2010 at 13:14, MichaelK <[email protected]> wrote: > > Hello, > > > I just upgraded to NH 3.0.0 Alpha 2 where previously I was using NH > > 2.2.4 with Linq addin. One feature I had in my old repository was a > > SetResultTransformer(new DistinctRootEntityResultTransformer()) to > > ensure unique records when I eagerly fetched values using left joins. > > My Repository exposes IQueryable<T>. In NH 3 I am using > > Session.Query<T> but how can I add a ResultTransformer to that so its > > always there? > > > -- > > 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]<nhusers%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. -- 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.
