Fabio: I know you didn't say projections, but Ayende Rahien and Ben
Lovell did.

Sorry I wasn't clear in my first post. I do indeed want the relations,
I just don't want to load them. Lazy loading does this, but this
brings up the problem of LazyInitializationExceptions, which
projection and DTOs seems to solve. I will try this tomorrow.

Thanks to everyone for your help!


On 17 Mar., 19:57, Fabio Maulo <[email protected]> wrote:
> 2009/3/17 Tyler Burd <[email protected]>
>
>
>
> > You might want to use projections and DTOs to get what you want.  Here is
> > an example:
>
> > string hql = "select u.Organization.Name, u.UserName from User u ";
> > var qry = session.CreateQuery();
> > qry.SetResultTransformer(new MyCustomDtoResultTransformer());
> > return qry.List<MyCustomDto>();
>
> And this mean work with relationship, have entities related and, in some
> certain cases, retrieve only plain info in unmapped value-objects/DTO (Data
> Transfer Object).
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to