Lazy loading for one-to-one association

Description

I'm not very advanced with NHibernate so it was surprising for me that lazy loading for one-to-one association is not possible.
I'm attaching description how this can be done. Possible that I've overlooked something but for me it seems that this should work.

Environment

None

Attachments

1
100% Done
Loading...

Activity

Show:

Fabio Maulo September 25, 2010 at 1:08 PM

Was fixed in NH3Alpha1 using lazy-properties feature.

Fabio Maulo May 17, 2009 at 10:27 PM

One test to pass is NHibernate.Test.LazyOneToOne.LazyOneToOneTest (available only with field-interception)

Tuna Toksoz December 18, 2008 at 11:55 AM

I am sorry Robert ,I didn't look into your attachments probably because i am tired yesterday.
Let's bring this discussion to the devlist, my mind doesn't accept anything other than sleep.

robsosno December 18, 2008 at 11:47 AM

Before I've created new item in Jira I've read much about the issue. I know all these links.
And the last one is directly referenced in my attachment. Have you read attachment?

I fully agree that if you consider pure domain model there is no way to avoid this (eager fetching for one-to-one).
But if you relax a little the requirement of purity (i.e. some kind of support from domain model is necessary) this becomes possible.

I'm not 100% sure that I'm right. If I'm not then could you indicate false assumption in my explanations (attachment)?

At the moment I'm considering theoretical feasibility of lazy loading. However if you would confirm that this is possible then next logical step is to implement this in some indefinite future.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created December 17, 2008 at 1:55 PM
Updated December 4, 2010 at 3:37 PM
Resolved September 25, 2010 at 1:08 PM
Who's Looking?