I have mapped a component for one of my entities and if I get a proxy of the entity by using
Code:
session.Load(persistentType, id);
, and then I access the component property of the entity like this:
Code:
memberAccount.Audit
, the component is null.
Here is my component mapping:
Code:
<component name="Audit" class="EntityAuditRecord" access="field.camelcase-underscore" >
<property name="DateCreated" column="DateCreated" not-null="true" access="nosetter.camelcase-underscore" />
<property name="DateModified" column="DateModified" type="Nullables.NHibernate.NullableDateTimeType, Nullables.NHibernate" access="nosetter.camelcase-underscore"/>
<many-to-one name="CreatedBy" column="CreatedByMemberId" class="Member" not-null="true" outer-join="false" access="nosetter.camelcase-underscore"/>
<many-to-one name="ModifiedBy" column="ModifiedByMemberId" class="Member" outer-join="false" access="nosetter.camelcase-underscore"/>
</component>
If I load the object immediatly with
Code:
session.Get(persistentType, id);
everything works fine.