예제 #1
0
		public EntityBinder(
			EntityAttribute hibAnn,
			System.Type annotatedClass,
			PersistentClass persistentClass,
			ExtendedMappings mappings
			)
		{
			this.mappings = mappings;
			this.persistentClass = persistentClass;
			this.annotatedClass = annotatedClass;
			BindHibernateAnnotation(hibAnn);
		}
예제 #2
0
		private void BindHibernateAnnotation(EntityAttribute hibAnn)
		{
			if (hibAnn != null)
			{
				dynamicInsert = hibAnn.IsDynamicInsert;
				dynamicUpdate = hibAnn.IsDynamicUpdate;
				optimisticLockType = hibAnn.OptimisticLock;
				selectBeforeUpdate = hibAnn.IsSelectBeforeUpdate;
				polymorphismType = hibAnn.Polymorphism;
				explicitHibernateEntityAnnotation = true;
				//persister handled in bind
			}
			else
			{
				//default values when the annotation is not there
				dynamicInsert = false;
				dynamicUpdate = false;
				optimisticLockType = OptimisticLockType.Version;
				polymorphismType = PolymorphismType.Implicit;
				selectBeforeUpdate = false;
			}
		}