public bool MapToMapFromEntity(ISessionImplementor session, IDictionary <String, Object> data, Object newObj, Object oldObj)
        {
            //Simon 27/06/2010 - era new LinkedHashMap
            IDictionary <String, Object> newData = new Dictionary <String, Object>();

            data.Add(propertyData.Name, newData);

            // If this property is originally non-insertable, but made insertable because it is in a many-to-one "fake"
            // bi-directional relation, we always store the "old", unchaged data, to prevent storing changes made
            // to this field. It is the responsibility of the collection to properly update it if it really changed.
            delegat.MapToMapFromEntity(newData, nonInsertableFake ? oldObj : newObj);

            //noinspection SimplifiableConditionalExpression
            return(nonInsertableFake ? false : !Toolz.EntitiesEqual(session, newObj, oldObj));
        }
        public override bool MapToMapFromEntity(ISessionImplementor session, IDictionary <string, object> data, object newObj, object oldObj)
        {
            var newData = new Dictionary <string, object>();

            // If this property is originally non-insertable, but made insertable because it is in a many-to-one "fake"
            // bi-directional relation, we always store the "old", unchaged data, to prevent storing changes made
            // to this field. It is the responsibility of the collection to properly update it if it really changed.
            _delegat.MapToMapFromEntity(newData, _nonInsertableFake ? oldObj : newObj);

            foreach (var entry in newData)
            {
                data[entry.Key] = entry.Value;
            }

            return(checkModified(session, newObj, oldObj));
        }