Not quite true Hudson. Your collections will still lazy load, so you
should be nowhere near loading your entire domain model into memory.
If you load an order line you might get the order and customer loaded
too, but the other orders that customer has won't be.

On Thu, Dec 10, 2009 at 8:16 AM, Hudson Akridge
<[email protected]> wrote:
>
> It's a pretty common practice if you're using Proxying frameworks. You can 
> turn proxying off in NH, but then you won't be able to lazy load anything 
> (Bad, unless you can keep your entire domain model in memory, and only 
> persist for backups).
>
> On Wed, Dec 9, 2009 at 11:37 AM, Sal <[email protected]> wrote:
>>
>> Ouch. I just discovered that goes for methods too, which while I can
>> understand the property/mapping thing, seems weird from a OOP design
>> standpoint.
>>
>> On Dec 9, 12:33 pm, Hudson Akridge <[email protected]> wrote:
>> > That's an NHibernate requirement, or more specificlly, a dynamic proxy
>> > requirement. NHibernate will proxy your classes to allow for lazy loading
>> > (on by default). This is a good thing. However, in order to correctly proxy
>> > your class, NHibernate *must* be able to override all of the non-private
>> > members, regardless of whether they're being mapped or not. The proxy
>> > generator doesn't know what's being mapped and what's not, it just knows
>> > that it needs to proxy the class.
>> >
>> > So yes, it's intentional, by design, and I don't believe there'd be an easy
>> > workaround. I'd recommend just virtualing everything unless you've got a
>> > specific reason why you want to disable lazy loading across your
>> > application.
>> >
>> >
>> >
>> > On Wed, Dec 9, 2009 at 11:22 AM, Sal <[email protected]> wrote:
>> > > I am getting this exception because some properties are not virtual.
>> > > However, these properties are not even in my classmap. I am not using
>> > > automapping at all. What gives? Is this intentional?
>> >
>> > > --
>> >
>> > > You received this message because you are subscribed to the Google Groups
>> > > "Fluent NHibernate" group.
>> > > To post to this group, send email to [email protected].
>> > > To unsubscribe from this group, send email to
>> > > [email protected]<fluent-nhibernate%[email protected]>
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/fluent-nhibernate?hl=en.
>> >
>> > --
>> > - Hudsonhttp://www.bestguesstheory.comhttp://twitter.com/HudsonAkridge
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "Fluent NHibernate" 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/fluent-nhibernate?hl=en.
>>
>>
>
>
>
> --
> - Hudson
> http://www.bestguesstheory.com
> http://twitter.com/HudsonAkridge
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Fluent NHibernate" 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/fluent-nhibernate?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en.


Reply via email to