Beispiel #1
0
        private void AddExtraInfoToProperty(property xmlProp, Property originalProp)
        {
            xmlProp.insert = originalProp.GetPropertyInsert();
            xmlProp.update = originalProp.GetPropertyUpdate();

            string formula = originalProp.GetPropertyFormula();

            if (!string.IsNullOrWhiteSpace(formula))
                xmlProp.formula = formula;

            xmlProp.optimisticlock = originalProp.GetPropertyOptimisticLock();
            xmlProp.generated = (propertyGeneration)Enum.Parse(typeof(propertyGeneration), originalProp.GetPropertyGenerated().ToString());

            var access = originalProp.GetPropertyAccess();

            if (access != Interfaces.NHibernateEnums.PropertyAccessTypes.inherit_default)
                xmlProp.access = access.ToString().Replace("_", "-");

            if (!originalProp.GetPropertyInsert())
            {
                xmlProp.insertSpecified = true;
                xmlProp.insert = false;
            }
            if (!originalProp.GetPropertyUpdate())
            {
                xmlProp.updateSpecified = true;
                xmlProp.update = false;
            }
        }