Is this a NHibernate bug or by design? -
i have following in mapping code file contact entity, lazy 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 entity class is:
private readonly ilist<int> prioritycodes= new list<int>();
when contact list obtained repository, notice contactproxy has interceptor field contains targetinstance. contactproxy inherits contact class, , base class contains private prioritycodes field.
the thing don't understand targetinstance private prioritycodes field empty, whereas base class prioritycodes field populated?
i have expected targetinstance contain populated private field, calls delegated targetinstance.
please explain if bug or, if not, reasoning behind this.
Comments
Post a Comment