I could be wrong, but I think the problem here is the serialisation, not the query/NH plumbing. If you want to 'not' get the associated you need to control the serialisation of your graph of objects.

Something like AutoMapper may help you copy your objects across to your DTOs.


-----Original Message----- From: Niclas Pehrsson
Sent: Tuesday, October 26, 2010 9:18 AM
To: nhusers
Subject: [nhusers] QueryOver and Fetch

Im looking for a method to use QueryOver and tell it to not load an
associated list on my entity.

The options are
Default
Eager
Lazy

I want the result from lazy but I'm working with wcf services and when
serializing it will load the associated list anyway. Are there some
way there I can tell it to never load the list. Like just skip loading
it?

I know I can do it by change my mapping and have different entitynames
but I'm looking for a more simple approach.

--
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.

--
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