Hello,

I have this situation:
http://dblendea.pastebin.com/f52096576

News has some properties and also Content, which is quite large and I
want it loaded lazily.
I tried to use the example provided by Gabriel Schenker here:
http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/11/17/lazy-loading-blobs-and-the-like-in-nhibernate.aspx

The hbm-s generated look like his, so I'm assuming I've made it
correctly.

But the test shows 3 statements instead of one.
Title is not lazy, but Content is.

1. SELECT top 2 this_.Id as Id5_0_, this_.Title as Title5_0_,
this_.Content as Content5_0_ FROM News this_ WHERE this_.Title like
@p0;@p0 = '%Error in NHibernate config!%'
2. SELECT newsconten0_.Id as Id4_0_, newsconten0_.Text as Text4_0_
FROM NewsContents newsconten0_ WHERE newsconten0_....@p0;@p0 = 1
3. SELECT news0_.Id as Id5_0_, news0_.Title as Title5_0_,
news0_.Content as Content5_0_ FROM News news0_ WHERE
news0_.conte...@p0;@p0 = 1

Did I do something wrong or is it another way of loading a property
lazily?

Thanks,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to