NHibernate Lazy="Extra"

Posted by Adam Rackis on Stack Overflow See other posts from Stack Overflow or by Adam Rackis
Published on 2011-02-22T15:15:29Z Indexed on 2011/02/22 15:25 UTC
Read the original article Hit count: 315

Filed under:

Is there a good explanation out there on what exactly lazy="extra" is capable of?

All the posts I've seen all just repeat the fact that it turns references to MyObject.ItsCollection.Count into select count(*) queries (assuming they're not loaded already).

I'd like to know if it's capable of more robust things, like turning MyObject.ItsCollection.Any(o => o.Whatever == 5) into a SELECT ...EXISTS query.

Section 18.1 of the docs only touches on it. I'm not an NH developer, so I can't really experiment with it and watch SQL Profiler without doing a bit of work getting everything set up; I'm just looking for some sort of reference describing what this feature is capable of.

Thank you!

© Stack Overflow or respective owner

Related posts about nhibernate