foreach(var persistentClass in cfg.ClassMappings)
{
foreach(var property in persistentClass.PropertyClosureIterator)
{
   bool isLazy = property.IsLazy;
  // your code
}
}
2009/2/18 Nieve <[email protected]>

>
> Any way I could get these when working with Mapping.Attribute or NFI?
> Are they anywhere in the Configuration object?
>
> On Feb 18, 3:42 pm, Ayende Rahien <[email protected]> wrote:
> > Read the HBM files, that is the easiest way.
> >
> > On Wed, Feb 18, 2009 at 9:17 AM, Nieve <[email protected]> wrote:
> >
> > > I suppose I should add that I have a winforms application that doesn't
> > > have long life open sessions. This means that sometimes I'm loading
> > > properties without knowing what are they (when drilling through an
> > > entity tree for example). Hence my search for a way to map these
> > > beforehand...
> >
> > > Thanks again for any reply :)
> >
> > > On Feb 18, 3:02 pm, Nieve <[email protected]> wrote:
> > > > Hi Ayende,
> > > > To make a long story short, I wish to get all of the lazy properties
> > > > in my domain objects.
> > > > That way, when I need to lazy initialise certain lazy properties, I
> > > > won't need to iterate all properties. At its base, this was an idea
> > > > that worked with Mapping.Attribute, so that I knew which property is
> > > > lazy with the help of reflection. Now that I found out this could be
> > > > done with Configuration, I'd like to broaden the mapping
> > > > possibilities...
> >
> > > > On Feb 18, 2:50 pm, Ayende Rahien <[email protected]> wrote:
> >
> > > > > what are you trying to do?
> >
> > > > > On Wed, Feb 18, 2009 at 8:47 AM, Nieve <[email protected]>
> wrote:
> >
> > > > > > Hello all,
> >
> > > > > > I'm looking for a way to get all lazy properties in my domain
> > > objects.
> > > > > > I came up with iterating the ClassMappings property of my
> > > > > > Configuration, getting each UnjoinedPropertyIterator property and
> > > > > > verifying whether any of the NHibernate.Mapping.Property IsLazy-
> but
> > > > > > this doesn't seem to work really. I took the Value property of
> the
> > > > > > NHibernate.Mapping.Property, but SimpleValue has no IsLazy
> property.
> >
> > > > > > Does anyone knows how this can/should be done?
> > > > > > would be grateful for any reply :)
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to