コード例 #1
0
ファイル: RootClassBinder.cs プロジェクト: pallmall/WCell
		private string GetClassTableName(PersistentClass model, HbmClass classSchema)
		{
			if (classSchema.table == null)
				return mappings.NamingStrategy.ClassToTableName(model.EntityName);
			else
				return mappings.NamingStrategy.TableName(classSchema.table.Trim());
		}
コード例 #2
0
ファイル: RootClassBinder.cs プロジェクト: pallmall/WCell
		private void BindTimestamp(HbmTimestamp timestampSchema, PersistentClass rootClass, Table table)
		{
			if (timestampSchema == null)
				return;

			string propertyName = timestampSchema.name;
			SimpleValue simpleValue = new SimpleValue(table);

			BindColumns(timestampSchema, simpleValue, propertyName);

			if (!simpleValue.IsTypeSpecified)
				simpleValue.TypeName = NHibernateUtil.Timestamp.Name;

			Mapping.Property property = new Mapping.Property(simpleValue);
			BindProperty(timestampSchema, property);

			// for version properties marked as being generated, make sure they are "always"
			// generated; "insert" is invalid. This is dis-allowed by the schema, but just to make
			// sure...

			if (property.Generation == PropertyGeneration.Insert)
				throw new MappingException("'generated' attribute cannot be 'insert' for versioning property");

			simpleValue.NullValue = timestampSchema.unsavedvalue;
			rootClass.Version = property;
			rootClass.AddProperty(property);
		}
コード例 #3
0
		private Mapping.Collection CreateList(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			List list = new List(owner);
			BindCollection(node, list, prefix, path, containingType, inheritedMetas);
			return list;
		}
コード例 #4
0
		private Mapping.Collection CreateSet(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			Set setCollection = new Set(owner);
			BindCollection(node, setCollection, prefix, path, containingType, inheritedMetas);
			return setCollection;
		}
コード例 #5
0
		private Mapping.Collection CreateMap(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			Map map = new Map(owner);
			BindCollection(node, map, prefix, path, containingType, inheritedMetas);
			return map;
		}
コード例 #6
0
        public NHibernateTypeDescriptor(Type entityType, ICustomTypeDescriptor parent,
                                        Configuration nhibernateConfiguration, Type metaDataType)
            : base(parent)
        {
            Type metaDataType1 = metaDataType;

            while (entityType != null && entityType.Name.EndsWith("Proxy") &&
                   entityType.Assembly.GetName().Name.EndsWith("ProxyAssembly"))
                entityType = entityType.BaseType;
            this.entityType = entityType;
            this._nhibernateConfiguration = nhibernateConfiguration;
            _classMetadata = nhibernateConfiguration.GetClassMapping(this.entityType);
            _identifierCols = _classMetadata.Identifier.ColumnIterator;

            if (metaDataType1 != null)
            {
                var memberInfos =
                    metaDataType1.GetMembers(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance);
                foreach (var memberInfo in memberInfos)
                {
                    var attributes = memberInfo.GetCustomAttributes(false).Cast<Attribute>();
                    if (attributes.Any())
                        _metaDataAttributes.Add(memberInfo.Name, attributes);
                }
            }
        }
コード例 #7
0
		private Mapping.Collection CreateIdentifierBag(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			IdentifierBag bag = new IdentifierBag(owner);
			BindCollection(node, bag, prefix, path, containingType, inheritedMetas);
			return bag;
		}
コード例 #8
0
ファイル: ClassIdBinder.cs プロジェクト: pallmall/WCell
		private void CreateIdentifierProperty(HbmId idSchema, PersistentClass rootClass, SimpleValue id)
		{
			if (idSchema.name != null)
			{
				string access = idSchema.access ?? mappings.DefaultAccess;
				id.SetTypeUsingReflection(rootClass.MappedClass.AssemblyQualifiedName, idSchema.name, access);

				Mapping.Property property = new Mapping.Property(id);
				property.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);

				rootClass.IdentifierProperty = property;

				LogMappedProperty(property);
			}
		}
		protected void BindSubclasses(IEnumerable<HbmSubclass> subclasses, PersistentClass persistentClass, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			foreach (var subclass in subclasses)
			{
				new SubclassBinder(this).HandleSubclass(persistentClass, subclass, inheritedMetas);
			}
		}
コード例 #10
0
ファイル: CollectionBinder.cs プロジェクト: pallmall/WCell
		private Mapping.Collection CreateList(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType)
		{
			List list = new List(owner);
			BindCollection(node, list, prefix, path, containingType);
			return list;
		}
コード例 #11
0
ファイル: CollectionBinder.cs プロジェクト: pallmall/WCell
		private Mapping.Collection CreateSet(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType)
		{
			Set setCollection = new Set(owner);
			BindCollection(node, setCollection, prefix, path, containingType);
			return setCollection;
		}
コード例 #12
0
ファイル: CollectionBinder.cs プロジェクト: pallmall/WCell
		private Mapping.Collection CreateIdentifierBag(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType)
		{
			IdentifierBag bag = new IdentifierBag(owner);
			BindCollection(node, bag, prefix, path, containingType);
			return bag;
		}
コード例 #13
0
ファイル: CollectionBinder.cs プロジェクト: pallmall/WCell
		private Mapping.Collection CreateMap(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType)
		{
			Map map = new Map(owner);
			BindCollection(node, map, prefix, path, containingType);
			return map;
		}
コード例 #14
0
		/// <summary>
		/// Generates an IdentifierProperty representation of the for a given entity mapping.
		/// </summary>
		/// <param name="mappedEntity">The mapping definition of the entity.</param>
		/// <param name="generator">The identifier value generator to use for this identifier.</param>
		/// <returns>The appropriate IdentifierProperty definition.</returns>
		public static IdentifierProperty BuildIdentifierProperty(PersistentClass mappedEntity, IIdentifierGenerator generator)
		{
			string mappedUnsavedValue = mappedEntity.Identifier.NullValue;
			IType type = mappedEntity.Identifier.Type;
			Mapping.Property property = mappedEntity.IdentifierProperty;

			Cascades.IdentifierValue unsavedValue = UnsavedValueFactory.GetUnsavedIdentifierValue(
				mappedUnsavedValue,
				GetGetter(property),
				type,
				GetConstructor(mappedEntity)
				);

			if (property == null)
			{
				// this is a virtual id property...
				return new IdentifierProperty(
					type,
					mappedEntity.HasEmbeddedIdentifier,
					unsavedValue,
					generator
					);
			}
			else
			{
				return new IdentifierProperty(
					property.Name,
					null, // TODO H3: property.NodeName,
					type,
					mappedEntity.HasEmbeddedIdentifier,
					unsavedValue,
					generator
					);
			}
		}
コード例 #15
0
        /// <summary>
        /// Wrapper class to produce an Ado.Net Datatable from any entity, 
        /// and perform SqlBulkCopy operations
        /// </summary>
        public SqlEntityBulkCopy(string sqlCnnString, Type entityType)
        {
            if (Cfg == null)
            {
                //Note: The NHibernate.Cfg.Configuration is meant only as an initialization-time object.
                //Note: NHibernate.ISessionFactory is immutable and does not retain any association back to the Session

                Cfg = new Configuration();
                //Cfg.SetProperty("proxyfactory.factory_class", "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle");
                Cfg.SetProperty("dialect", "NHibernate.Dialect.MsSql2008Dialect");
                Cfg.SetProperty("connection.provider", "NHibernate.Connection.DriverConnectionProvider");
                Cfg.SetProperty("connection.driver_class", "NHibernate.Driver.SqlClientDriver");
                Cfg.SetProperty("connection.connection_string", sqlCnnString);

                //add all the mappings embedded in this assembly
                Cfg.AddAssembly(typeof(SqlEntityBulkCopy).Assembly);

                var sessionFactory = Cfg.BuildSessionFactory();
                SessionFactoryImpl = (ISessionFactoryImplementor)sessionFactory;
            }
            EntityType = entityType;
            //_session = SessionFactoryImpl.OpenSession();
            _metaData = SessionFactoryImpl.GetClassMetadata(EntityType);
            _persistentClass = Cfg.GetClassMapping(EntityType);
            _sqlCnn = new SqlConnection(sqlCnnString);
            _sqlBulkCopy = new SqlBulkCopy(_sqlCnn);

            //Debug.WriteLine("EntityName = " + _metaData.EntityName);
            //Debug.WriteLine("IdentifierPropertyName = " + _metaData.IdentifierPropertyName);
            //Debug.WriteLine("IdentifierType = " + _metaData.IdentifierType);

            BuildDataTable();
            BuildAndMapSqlBulkCopy();
        }
コード例 #16
0
		public void HandleUnionSubclass(PersistentClass model, XmlNode subnode, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var unionSubclass = new UnionSubclass(model);

			BindClass(subnode, null, unionSubclass, inheritedMetas);
			inheritedMetas = GetMetas(subnode.SelectNodes(HbmConstants.nsMeta, namespaceManager), inheritedMetas, true); // get meta's from <union-subclass>

			// union subclass
			if (unionSubclass.EntityPersisterClass == null)
				unionSubclass.RootClazz.EntityPersisterClass = typeof(UnionSubclassEntityPersister);

			//table + schema names
			XmlAttribute schemaNode = subnode.Attributes["schema"];
			string schema = schemaNode == null ? mappings.SchemaName : schemaNode.Value;
			XmlAttribute catalogNode = subnode.Attributes["catalog"];
			string catalog = catalogNode == null ? mappings.CatalogName : catalogNode.Value;

			Table denormalizedSuperTable = unionSubclass.Superclass.Table;
			Table mytable =
				mappings.AddDenormalizedTable(schema, catalog, GetClassTableName(unionSubclass, subnode),
				                              unionSubclass.IsAbstract.GetValueOrDefault(), null, denormalizedSuperTable);
			((ITableOwner)unionSubclass).Table = mytable;

			log.InfoFormat("Mapping union-subclass: {0} -> {1}", unionSubclass.EntityName, unionSubclass.Table.Name);

			// properties
			PropertiesFromXML(subnode, unionSubclass, inheritedMetas);

			model.AddSubclass(unionSubclass);
			mappings.AddClass(unionSubclass);
		}
コード例 #17
0
		protected void BindJoinedSubclasses(IEnumerable<HbmJoinedSubclass> joinedSubclasses, PersistentClass persistentClass, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			foreach (var joinedSubclass in joinedSubclasses)
			{
				new JoinedSubclassBinder(this).HandleJoinedSubclass(persistentClass, joinedSubclass, inheritedMetas);
			}
		}
コード例 #18
0
		public void HandleUnionSubclass(PersistentClass model, HbmUnionSubclass unionSubclassMapping, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var unionSubclass = new UnionSubclass(model);

			BindClass(unionSubclassMapping, unionSubclass, inheritedMetas);
			inheritedMetas = GetMetas(unionSubclassMapping, inheritedMetas, true); // get meta's from <union-subclass>

			// union subclass
			if (unionSubclass.EntityPersisterClass == null)
				unionSubclass.RootClazz.EntityPersisterClass = typeof(UnionSubclassEntityPersister);

			//table + schema names
			string schema = unionSubclassMapping.schema ?? mappings.SchemaName;
			string catalog = unionSubclassMapping.catalog ?? mappings.CatalogName;

			Table denormalizedSuperTable = unionSubclass.Superclass.Table;
			Table mytable =
				mappings.AddDenormalizedTable(schema, catalog, GetClassTableName(unionSubclass, unionSubclassMapping.table),
				                              unionSubclass.IsAbstract.GetValueOrDefault(), null, denormalizedSuperTable);
			((ITableOwner)unionSubclass).Table = mytable;

			log.InfoFormat("Mapping union-subclass: {0} -> {1}", unionSubclass.EntityName, unionSubclass.Table.Name);

			// properties
			new PropertiesBinder(mappings, unionSubclass, dialect).Bind(unionSubclassMapping.Properties, inheritedMetas);
			BindUnionSubclasses(unionSubclassMapping.UnionSubclasses, unionSubclass, inheritedMetas);

			model.AddSubclass(unionSubclass);
			mappings.AddClass(unionSubclass);
		}
コード例 #19
0
ファイル: UnionSubclassBinder.cs プロジェクト: zibler/zibler
        public void HandleUnionSubclass(PersistentClass model, XmlNode subnode)
        {
            UnionSubclass unionSubclass = new UnionSubclass(model);

            BindClass(subnode, unionSubclass);

            // union subclass
            if (unionSubclass.EntityPersisterClass == null)
                unionSubclass.RootClazz.EntityPersisterClass = typeof(UnionSubclassEntityPersister);

            //table + schema names
            XmlAttribute schemaNode = subnode.Attributes["schema"];
            string schema = schemaNode == null ? mappings.SchemaName : schemaNode.Value;
            XmlAttribute catalogNode = subnode.Attributes["catalog"];
            string catalog = catalogNode == null ? mappings.CatalogName : catalogNode.Value;

            Table denormalizedSuperTable = unionSubclass.Superclass.Table;
            Table mytable =
                mappings.AddDenormalizedTable(schema, catalog, GetClassTableName(unionSubclass, subnode),
                                              unionSubclass.IsAbstract.GetValueOrDefault(), null, denormalizedSuperTable);
            ((ITableOwner)unionSubclass).Table = mytable;

            log.InfoFormat("Mapping union-subclass: {0} -> {1}", unionSubclass.EntityName, unionSubclass.Table.Name);

            // properties
            PropertiesFromXML(subnode, unionSubclass);

            model.AddSubclass(unionSubclass);
            mappings.AddClass(unionSubclass);
        }
コード例 #20
0
		public Mapping.Collection Create(ICollectionPropertiesMapping collectionMapping, string className,
			string propertyFullPath, PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var collectionType = collectionMapping.GetType();
			if (collectionType == typeof (HbmBag))
			{
				return CreateBag((HbmBag)collectionMapping, className, propertyFullPath, owner, containingType, inheritedMetas);
			}
			else if (collectionType == typeof (HbmSet))
			{
				return CreateSet((HbmSet)collectionMapping, className, propertyFullPath, owner, containingType, inheritedMetas);
			}
			else if (collectionType == typeof (HbmList))
			{
				return CreateList((HbmList)collectionMapping, className, propertyFullPath, owner, containingType, inheritedMetas);
			}
			else if (collectionType == typeof (HbmMap))
			{
				return CreateMap((HbmMap)collectionMapping, className, propertyFullPath, owner, containingType, inheritedMetas);
			}
			else if (collectionType == typeof (HbmIdbag))
			{
				return CreateIdentifierBag((HbmIdbag)collectionMapping, className, propertyFullPath, owner, containingType, inheritedMetas);
			}
			else if (collectionType == typeof (HbmArray))
			{
				return CreateArray((HbmArray)collectionMapping, className, propertyFullPath, owner, containingType, inheritedMetas);
			}
			else if (collectionType == typeof (HbmPrimitiveArray))
			{
				return CreatePrimitiveArray((HbmPrimitiveArray)collectionMapping, className, propertyFullPath, owner, containingType, inheritedMetas);
			}
			throw new MappingException("Not supported collection mapping element:" + collectionType);
		}
コード例 #21
0
		public PocoEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity)
			: base(entityMetamodel, mappedEntity)
		{
			mappedClass = mappedEntity.MappedClass;
			proxyInterface = mappedEntity.ProxyInterface;
			islifecycleImplementor = typeof(ILifecycle).IsAssignableFrom(mappedClass);
			isValidatableImplementor = typeof(IValidatable).IsAssignableFrom(mappedClass);

			foreach (Mapping.Property property in mappedEntity.PropertyClosureIterator)
			{
				if (property.IsLazy)
					lazyPropertyNames.Add(property.Name);
				if (property.UnwrapProxy)
					unwrapProxyPropertyNames.Add(property.Name);
			}
			SetReflectionOptimizer();

			Instantiator = BuildInstantiator(mappedEntity);

			if (hasCustomAccessors)
			{
				optimizer = null;
			}

			proxyValidator = Cfg.Environment.BytecodeProvider.ProxyFactoryFactory.ProxyValidator;
		}
コード例 #22
0
		/// <summary>
		/// Creates a specific Persister - could be a built in or custom persister.
		/// </summary>
		/// <param name="persisterClass"></param>
		/// <param name="model"></param>
		/// <param name="factory"></param>
		/// <returns></returns>
		public static IClassPersister Create( System.Type persisterClass, PersistentClass model, ISessionFactoryImplementor factory )
		{
			ConstructorInfo pc;
			try
			{
				pc = persisterClass.GetConstructor( PersisterFactory.PersisterConstructorArgs );
			}
			catch( Exception e )
			{
				throw new MappingException( "Could not get constructor for " + persisterClass.Name, e );
			}

			try
			{
				return ( IClassPersister ) pc.Invoke( new object[ ] {model, factory} );
			}
			catch( TargetInvocationException tie )
			{
				Exception e = tie.InnerException;
				if( e is HibernateException )
				{
					throw e;
				}
				else
				{
					throw new MappingException( "Could not instantiate persister " + persisterClass.Name, e );
				}
			}
			catch( Exception e )
			{
				throw new MappingException( "Could not instantiate persister " + persisterClass.Name, e );
			}
		}
コード例 #23
0
		public void BindId(HbmId idSchema, PersistentClass rootClass, Table table)
		{
			if (idSchema != null)
			{
				var id = new SimpleValue(table);
				new TypeBinder(id, Mappings).Bind(idSchema.Type);

				rootClass.Identifier = id;

				Func<HbmColumn> defaultColumn = () => new HbmColumn
				{
					name = idSchema.name ?? RootClass.DefaultIdentifierColumnName,
					length = idSchema.length
				};

				new ColumnsBinder(id, Mappings).Bind(idSchema.Columns, false, defaultColumn);

				CreateIdentifierProperty(idSchema, rootClass, id);
				VerifiyIdTypeIsValid(id.Type, rootClass.EntityName);

				new IdGeneratorBinder(Mappings).BindGenerator(id, GetIdGenerator(idSchema));

				id.Table.SetIdentifierValue(id);

				BindUnsavedValue(idSchema, id);
			}
		}
コード例 #24
0
        public AnnotationsMetadataReader(GlobalConfiguration globalCfg, PersistentClass pc)
        {
            this.globalCfg = globalCfg;
            this.pc = pc;

            _auditData = new ClassAuditingData();
        }
コード例 #25
0
		protected void BindUnionSubclasses(IEnumerable<HbmUnionSubclass> unionSubclasses, PersistentClass persistentClass, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			foreach (var unionSubclass in unionSubclasses)
			{
				new UnionSubclassBinder(this).HandleUnionSubclass(persistentClass, unionSubclass, inheritedMetas);
			}
		}
コード例 #26
0
		private Mapping.Collection CreateMap(HbmMap mapMapping, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var map = new Map(owner);
			BindCollection(mapMapping, map, prefix, path, containingType, inheritedMetas);
			AddMapSecondPass(mapMapping, map, inheritedMetas);
			return map;
		}
コード例 #27
0
		private Mapping.Collection CreateSet(HbmSet setMapping, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var setCollection = new Set(owner);
			BindCollection(setMapping, setCollection, prefix, path, containingType, inheritedMetas);
			AddSetSecondPass(setMapping, setCollection, inheritedMetas);
			return setCollection;
		}
コード例 #28
0
ファイル: ClassIdBinder.cs プロジェクト: pallmall/WCell
		private static SimpleValue CreateIdentifier(HbmId idSchema, PersistentClass rootClass, Table table)
		{
			SimpleValue iv = new SimpleValue(table);
			iv.TypeName = idSchema.type;
			rootClass.Identifier = iv;

			return iv;
		}
コード例 #29
0
		private Mapping.Collection CreateList(HbmList listMapping, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var list = new List(owner);
			BindCollection(listMapping, list, prefix, path, containingType, inheritedMetas);
			AddListSecondPass(listMapping, list, inheritedMetas);
			return list;
		}
コード例 #30
0
		private Mapping.Collection CreateBag(HbmBag bagMapping, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var bag = new Bag(owner);
			BindCollection(bagMapping, bag, prefix, path, containingType, inheritedMetas);
			AddCollectionSecondPass(bagMapping, bag, inheritedMetas);
			return bag;
		}
コード例 #31
0
        /// <summary>
        /// Тест наличия правил удаления для классов добавленных в Nhibernate.
        /// Чтобы исключить класс из проверки добавьте его в коллекцию IgnoreMissingClass
        /// </summary>
        public virtual void DeleteRuleExisitForNHMappedClasssTest(NHibernate.Mapping.PersistentClass mapping)
        {
            if (IgnoreMissingClass.ContainsKey(mapping.MappedClass))
            {
                Assert.Ignore(IgnoreMissingClass[mapping.MappedClass]);
            }

            var exist = DeleteConfig.ClassDeleteRules.Any(i => i.ObjectClass == mapping.MappedClass);

            Assert.That(exist, "Класс {0} настроен в мапинге NHibernate, но для него отсутствуют правила удаления.", mapping.MappedClass);
        }
コード例 #32
0
        /// <summary>
        /// Adds a <see cref="Subclass"/> to the class hierarchy.
        /// </summary>
        /// <param name="subclass">The <see cref="Subclass"/> to add to the hierarchy.</param>
        public virtual void AddSubclass(Subclass subclass)
        {
            // Inheritable cycle detection (paranoid check)
            PersistentClass superclass = Superclass;

            while (superclass != null)
            {
                if (subclass.Name == superclass.Name)
                {
                    throw new MappingException(string.Format("Circular inheritance mapping detected: {0} will have itself as superclass when extending {1}", subclass.Name, Name));
                }
                superclass = superclass.Superclass;
            }
            subclasses.Add(subclass);
        }
コード例 #33
0
 public PrimitiveArray(PersistentClass owner) : base(owner)
 {
 }
コード例 #34
0
 public override void DeleteRuleExisitForNHMappedClasssTest(NHibernate.Mapping.PersistentClass mapping)
 {
     base.DeleteRuleExisitForNHMappedClasssTest(mapping);
 }
コード例 #35
0
ファイル: Subclass.cs プロジェクト: spahnke/nhibernate-core
 /// <summary>
 /// Initializes a new instance of the <see cref="Subclass"/> class.
 /// </summary>
 /// <param name="superclass">The <see cref="PersistentClass"/> that is the superclass.</param>
 public Subclass(PersistentClass superclass)
 {
     this.superclass = superclass;
     subclassId      = superclass.NextSubclassId();
 }
コード例 #36
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="table"></param>
 /// <param name="owner"></param>
 public OneToOne(Table table, PersistentClass owner)
     : base(table)
 {
     identifier = owner.Key;
     entityName = owner.EntityName;
 }
コード例 #37
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="owner"></param>
 protected IdentifierCollection(PersistentClass owner) : base(owner)
 {
 }
コード例 #38
0
ファイル: Component.cs プロジェクト: jrauber/GH1429
 public Component(Collection collection)
     : base(collection.CollectionTable)
 {
     owner = collection.Owner;
 }
コード例 #39
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="table"></param>
 public Component(Table table) : base(table)
 {
     this.owner = null;
 }
コード例 #40
0
ファイル: Component.cs プロジェクト: stuartcarnie/nhcontrib
 public Component(Join join)
     : base(join.Table)
 {
     owner = join.PersistentClass;
 }
コード例 #41
0
ファイル: Map.cs プロジェクト: zmp2000/nhibernate-core
 /// <summary>
 /// Initializes a new instance of the <see cref="Map" /> class.
 /// </summary>
 /// <param name="owner">The <see cref="PersistentClass"/> that contains this map mapping.</param>
 public Map(PersistentClass owner) : base(owner)
 {
 }
コード例 #42
0
ファイル: UnionSubclass.cs プロジェクト: renefc3/nhibernate
 public UnionSubclass(PersistentClass superclass)
     : base(superclass)
 {
 }
コード例 #43
0
ファイル: OneToMany.cs プロジェクト: zmp2000/nhibernate-core
 public OneToMany(PersistentClass owner)
 {
     referencingTable = (owner == null) ? null : owner.Table;
 }
コード例 #44
0
ファイル: Array.cs プロジェクト: ImanRezaeipour/GTS
 public Array(PersistentClass owner) : base(owner)
 {
 }
コード例 #45
0
 /// <summary>
 /// A bag permits duplicates, so it has no primary key.
 /// </summary>
 /// <param name="owner">The <see cref="PersistentClass"/> that contains this bag mapping.</param>
 public Bag(PersistentClass owner) : base(owner)
 {
 }
コード例 #46
0
ファイル: Component.cs プロジェクト: jrauber/GH1429
 /// <summary>
 ///
 /// </summary>
 /// <param name="owner"></param>
 public Component(PersistentClass owner)
     : base(owner.Table)
 {
     this.owner = owner;
 }
コード例 #47
0
 /// <summary>
 /// Initializes a new instance of the <see cref="List"/> class.
 /// </summary>
 /// <param name="owner">The <see cref="PersistentClass"/> that contains this list mapping.</param>
 public List(PersistentClass owner) : base(owner)
 {
 }
コード例 #48
0
 protected IndexedCollection(PersistentClass owner) : base(owner)
 {
 }
コード例 #49
0
ファイル: Component.cs プロジェクト: jrauber/GH1429
 public Component(Component component)
     : base(component.Table)
 {
     owner = component.Owner;
 }
コード例 #50
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="owner"></param>
 public IdentifierBag(PersistentClass owner) : base(owner)
 {
 }
コード例 #51
0
ファイル: Component.cs プロジェクト: jrauber/GH1429
 public Component(Table table, PersistentClass owner)
     : base(table)
 {
     this.owner = owner;
 }
コード例 #52
0
 public JoinedSubclass(PersistentClass superclass)
     : base(superclass)
 {
 }
コード例 #53
0
ファイル: Collection.cs プロジェクト: ImanRezaeipour/GTS
 protected Collection(PersistentClass owner)
 {
     this.owner = owner;
 }
コード例 #54
0
 public SingleTableSubclass(PersistentClass superclass)
     : base(superclass)
 {
 }