本文整理汇总了C#中Property.LogMapped方法的典型用法代码示例。如果您正苦于以下问题:C# Property.LogMapped方法的具体用法?C# Property.LogMapped怎么用?C# Property.LogMapped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property.LogMapped方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateIdentifierProperty
private void CreateIdentifierProperty(HbmId idSchema, PersistentClass rootClass, SimpleValue id)
{
if (idSchema.name != null)
{
string access = idSchema.access ?? mappings.DefaultAccess;
id.SetTypeUsingReflection(rootClass.MappedClass == null ? null : rootClass.MappedClass.AssemblyQualifiedName, idSchema.name, access);
var property = new Property(id) { Name = idSchema.name };
if (property.Value.Type == null)
throw new MappingException("could not determine a property type for: " + property.Name);
property.PropertyAccessorName = idSchema.access ?? mappings.DefaultAccess;
property.Cascade = mappings.DefaultCascade;
property.IsUpdateable = true;
property.IsInsertable = true;
property.IsOptimisticLocked = true;
property.Generation = PropertyGeneration.Never;
property.MetaAttributes = GetMetas(idSchema, EmptyMeta);
rootClass.IdentifierProperty = property;
property.LogMapped(log);
}
}
示例2: BindProperty
private void BindProperty(HbmVersion versionSchema, Property property, IDictionary<string, MetaAttribute> inheritedMetas)
{
property.Name = versionSchema.name;
if (property.Value.Type == null)
throw new MappingException("could not determine a property type for: " + property.Name);
property.PropertyAccessorName = versionSchema.access ?? mappings.DefaultAccess;
property.Cascade = mappings.DefaultCascade;
property.IsUpdateable = true;
property.IsInsertable = true;
property.IsOptimisticLocked = true;
property.Generation = Convert(versionSchema.generated);
if (property.Generation == PropertyGeneration.Always
|| property.Generation == PropertyGeneration.Insert)
{
// generated properties can *never* be insertable...
if (property.IsInsertable)
// insertable simply because that is the user did not specify
// anything; just override it
property.IsInsertable = false;
// properties generated on update can never be updateable...
if (property.IsUpdateable && property.Generation == PropertyGeneration.Always)
// updateable only because the user did not specify
// anything; just override it
property.IsUpdateable = false;
}
property.MetaAttributes = GetMetas(versionSchema, inheritedMetas);
property.LogMapped(log);
}