Hi,

I'm binding a DataList control in ASP.net to an IList of Video
entities returned by a NH query. The DataList is paginated and if I
move from one page to the other, NH gets the data from the 2nd level
cache because I've cached the query.

The entities in my IList look like this :

Video {Id, Title, Owner}
Owner{Id, User}

I do Eager fetching on Owner when I get my list of Video entities.
I've checked when debugging and the Video entities contain their
respective Owner entity.

However if my DataList template I do :

<label text='<%# Eval("Owner.FullName") %>' />

Then the Owner is not retrieved from the cache and instead NH does a
separate query for each Video entity (at least one per distinct
owner).

Why ?  Is that a bug in the ASP.net Caching or is it to do with NH ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to