I have the following in the mapping by code file for a Contact entity,
which is lazy by default:
this.Bag<int>(
"priorityCodes",
map =>
{
map.Access(Accessor.Field);
map.Table("PriorityCodes");
map.Key(k => k.Column("ContactId"));
map.Cascade(Cascade.All);
},
r => r.Element(m => m.Column("PriorityCode")));
The code in the entity class is:
private readonly IList<int> priorityCodes= new List<int>();
When a contact list is obtained from the repository, I notice that the
ContactProxy has an interceptor field which contains the targetInstance.
The ContactProxy also inherits from the Contact class, and that base class
contains a private priorityCodes field.
The thing I don't understand is that the targetInstance private
priorityCodes field is empty, whereas the base class priorityCodes field is
populated?
I would have expected the targetInstance to contain the populated private
field, as all calls are delegated to the targetInstance.
Please could someone explain if this is a bug or, if not, the reasoning
behind this.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.