示例#1
0
        public override bool IsOneToOne(System.Reflection.MemberInfo member)
        {
            if (IsComponent(member.GetPropertyOrFieldType()))
            {
                return false;
            }

            return base.IsOneToOne(member);
        }
示例#2
0
        public void ApplyMapping(Attribute attribute, System.Reflection.MemberInfo idProperty, Type entityType, NHibernate.Mapping.ByCode.IClassAttributesMapper mapper, MappingContext context)
        {
            var idType = idProperty.GetPropertyOrFieldType();

            if (idType == typeof(Int32) || idType == typeof(Int64))
            {
                new HiloIdAttributeMapper().ApplyMapping(new HiloIdAttribute(), idProperty, entityType, mapper, context);
            }
            else if (idType == typeof(Guid))
            {
                new GuidAttributeMapper().ApplyMapping(new GuidAttribute(), idProperty, entityType, mapper, context);
            }
        }