public DiscriminatorMapping()
 {
     _attributes = new AttributeStore<DiscriminatorMapping>();
     _attributes.SetDefault(x => x.IsNotNullable, true);
     _attributes.SetDefault(x => x.Insert, true);
     _attributes.SetDefault(x => x.DiscriminatorType, DiscriminatorType.String);
 }
예제 #2
0
        public AnyMapping(AttributeStore underlyingStore)
        {
            attributes = new AttributeStore <AnyMapping>(underlyingStore);

            attributes.SetDefault(x => x.Insert, true);
            attributes.SetDefault(x => x.Update, true);
            attributes.SetDefault(x => x.OptimisticLock, true);
            attributes.SetDefault(x => x.Lazy, false);
        }
        public DiscriminatorMapping(ClassMapping parentClass)
        {
            ParentClass = parentClass;

            attributes = new AttributeStore<DiscriminatorMapping>();
            attributes.SetDefault(x => x.NotNull, true);
            attributes.SetDefault(x => x.Insert, true);
            attributes.SetDefault(x => x.Type, typeof(string));
        }
        public HibernateMapping(AttributeStore underlyingStore)
        {
            attributes = new AttributeStore <HibernateMapping>(underlyingStore);
            classes    = new List <ClassMapping>();
            filters    = new List <FilterDefinitionMapping>();
            imports    = new List <ImportMapping>();

            attributes.SetDefault(x => x.DefaultCascade, "none");
            attributes.SetDefault(x => x.DefaultAccess, "property");
            attributes.SetDefault(x => x.DefaultLazy, true);
            attributes.SetDefault(x => x.AutoImport, true);
        }
 protected MapsMemberBase(AttributeStore underlyingStore)
 {
     _attributes = new AttributeStore<MapsMemberBase>(underlyingStore);
     _attributes.SetDefault(x => x.MemberAccess, MemberAccess.CreateDefault());
 }
예제 #6
0
 public void SetDefaultValue <TResult>(string property, TResult value)
 {
     attributes.SetDefault(property, value);
 }
 public void SetDefaultValue <TResult>(Expression <Func <ManyToOneMapping, TResult> > property, TResult value)
 {
     attributes.SetDefault(property, value);
 }
 public void SetDefaultValue <TResult>(Expression <Func <StoredProcedureMapping, TResult> > property, TResult value)
 {
     attributes.SetDefault(property, value);
 }
예제 #9
0
 public NaturalIdMapping(AttributeStore underlyingStore)
 {
     attributes = new AttributeStore <NaturalIdMapping>(underlyingStore);
     attributes.SetDefault(x => x.Mutable, false);
 }