views:

160

answers:

1

I'm using the field.camelcase in my mapping files to setting things like collections, dependant entities, etc. and exposing the collections as readonly arrays. I know the access strategy does not affect the lazy loading, I just want confirm that this will still be cached:

private ISet<AttributeValue> attributes;
public virtual AttributeValue[] Attributes
        {
            get { return attributes.ToArray(); }
        }
A: 

The access value just tells it how to access the field and field.camelcase just tells it the naming strategy. This doesn't affect lazy loading. The lazy value will determine lazy loading in the mapping.

See: http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/mapping.html#mapping-declaration-property

Arthur Thomas