public virtual void OnModelChanged(Net.Vpc.Upa.Callbacks.PersistenceUnitEvent @event) { Net.Vpc.Upa.Types.DataType dataType = field.GetDataType(); if (dataType is Net.Vpc.Upa.Impl.SerializableOrManyToOneType) { Net.Vpc.Upa.Impl.SerializableOrManyToOneType masterDatatype = (Net.Vpc.Upa.Impl.SerializableOrManyToOneType)dataType; System.Type tt = masterDatatype.GetEntityType(); if (Net.Vpc.Upa.Impl.Util.PlatformUtils.IsSerializable(tt)) { field.SetDataType(new Net.Vpc.Upa.Types.SerializableType(masterDatatype.GetName(), tt, masterDatatype.IsNullable())); field.SetTypeTransform(null); } else { throw new System.ArgumentException("Type " + tt + " is neither Entity nor Serializable for " + field); } } }