Наследование: FluentNHibernate.MappingModel.MappingBase
        public override void establish_context()
        {
            parentMapping = new ParentMapping();
            externalComponentMapping = new ExternalComponentMapping(ComponentType.Component);
            externalComponentMapping.Set(x => x.Access, Layer.Defaults, "access");
            externalComponentMapping.Set(x => x.Insert, Layer.Defaults, true);
            externalComponentMapping.Set(x => x.Lazy, Layer.Defaults, true);
            externalComponentMapping.Set(x => x.OptimisticLock, Layer.Defaults, true);
            externalComponentMapping.Set(x => x.Parent, Layer.Defaults, parentMapping);
            externalComponentMapping.Set(x => x.Unique, Layer.Defaults, true);
            externalComponentMapping.Set(x => x.Update, Layer.Defaults, true);
            externalComponentMapping.AddAny(new AnyMapping());
            externalComponentMapping.AddCollection(CollectionMapping.Bag());
            externalComponentMapping.AddComponent(new ComponentMapping(ComponentType.Component));
            externalComponentMapping.AddFilter(new FilterMapping());
            externalComponentMapping.AddOneToOne(new OneToOneMapping());
            externalComponentMapping.AddProperty(new PropertyMapping());
            externalComponentMapping.AddReference(new ManyToOneMapping());

            memberProperty = new DummyPropertyInfo("Component", typeof(Target)).ToMember();
            referenceComponentMapping = new ReferenceComponentMapping(ComponentType.Component, memberProperty, typeof(ComponentTarget), typeof(Target), "column-prefix");
        }
        public override void establish_context()
        {
            parent_mapping = new ParentMapping();
            external_component_mapping = new ExternalComponentMapping(ComponentType.Component)
            {
                Access = "access",
                Insert = true,
                Lazy = true,
                OptimisticLock = true,
                Parent = parent_mapping,
                Unique = true,
                Update = true
            };
            external_component_mapping.AddAny(new AnyMapping());
            external_component_mapping.AddCollection(new BagMapping());
            external_component_mapping.AddComponent(new ComponentMapping(ComponentType.Component));
            external_component_mapping.AddFilter(new FilterMapping());
            external_component_mapping.AddOneToOne(new OneToOneMapping());
            external_component_mapping.AddProperty(new PropertyMapping());
            external_component_mapping.AddReference(new ManyToOneMapping());

            member_property = new DummyPropertyInfo("Component", typeof(Target)).ToMember();
            reference_component_mapping = new ReferenceComponentMapping(ComponentType.Component, member_property, typeof(ComponentTarget), typeof(Target), "column-prefix");
        }
 public virtual void Visit(ParentMapping parentMapping)
 {
 }
 public virtual void ProcessParent(ParentMapping parentMapping)
 {
 }
 public ParentInspector(ParentMapping mapping)
 {
     this.mapping = mapping;
 }
Пример #6
0
 public virtual void Visit(ParentMapping parentMapping)
 {
 }
Пример #7
0
 public virtual void ProcessParent(ParentMapping parentMapping)
 {
 }
 public void CreateDsl()
 {
     mapping = new ParentMapping();
     inspector = new ParentInspector(mapping);
 }
Пример #9
0
 public bool Equals(ParentMapping other)
 {
     return(Equals(other.attributes, attributes) && Equals(other.ContainingEntityType, ContainingEntityType));
 }
Пример #10
0
 public ParentInspector(ParentMapping mapping)
 {
     this.mapping = mapping;
     mappedProperties.AutoMap();
 }