>
> So, to verify understanding, are you saying that the *Id* property is a
> special case to this and does NOT load the entire myEntity.RelatedEntity ??
Yes, I'm pretty sure. I don't have a working example sitting in front of me
doing that, but I believe I've verified that to be the case in the
hmm.. forgive me being a newbie to NH as a whole, not just Fluent.
My understanding of Lazy loading is that if i have an Entity myEntity,
myEntity.RelatedEntity is NOT loaded by default, but when I do something
like
var relatedEntity = myEntity.RelatedEntity;
or
var someValueInRelatedEntity =
myEn
If I'm not mistaken, just accessing the Id property of an entity that's lazy
loaded, does not force a loading of that entity. The proxy has the Id on it,
it's how it knows about which entity to go and get it whenever it's being
lazy initialized.
I could set up a simple test to verify though, but I
Well, what if this is exactly what I want to avoid? What I want to avoid
loading the entity (no need in my scenario most of the time I'll just be
setting or reading only the key). Say ibn the UI for editing screen I have
drop down menu with all OtherEntity objects and I want to just compare IDs
to
Well, there's no need for the RelatedEntityId to also be a property in the
Entity class. Because the RelatedEntity class should have it's own ID (say
you call it RelatedEntityId as a property in that classes mapping). So you
should be able to retrieve an Entity, and do
Entity.RelatedEntity.RelatedE