asp.net mvc 2 - NHibernate ISet of Value Objects error in production NULL values in DELETE Statement on fields that have value -
i have error in production built 2 web servers against common sql-server database.
i have 1 root entity iset of value objects.
the mapping looks this.
mapping.hasmany(x => x.dayinfos) .access.camelcasefield(prefix.underscore) .table("weeklymaildayinfo") .component(c => { c.map(x => x.dayofweek); c.map(x => x.imagetext); c.map(x => x.imageurl); });
when user changes imageurl code removes , adds new dayinfo iset.
the problem see in production logfiles generated nhibernate. log indicates delete weeklymaildayinfo weeklymailfk = @p0 , dayofweek = @p1 , imagetext = @p2 , imageurl = @p3;@p0 = 3003, @p1 = 'tuesday', @p2 = null, @p3 = null
note 2 nulls though there value in imageurl , imagetext already.
i'm unable reproduce in unittest or in development enironment.
devweb , unittests executed against sqlite
since you're mapping list of components, nhibernate has no primary key uniquely identify row. therefore has perform delete based on equality columns indicate.
as nulls, have tried running test suite against copy of production? don't have dayinfo objects in collection no imagetext , imageurl?
Comments
Post a Comment