|
From: <fab...@us...> - 2011-04-02 21:26:26
|
Revision: 5585
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5585&view=rev
Author: fabiomaulo
Date: 2011-04-02 21:26:20 +0000 (Sat, 02 Apr 2011)
Log Message:
-----------
IsEntity should use enlisted registrations
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassSequenceRegistrationTests.cs
Modified: trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs 2011-04-02 21:18:48 UTC (rev 5584)
+++ trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs 2011-04-02 21:26:20 UTC (rev 5585)
@@ -404,7 +404,9 @@
tablePerClassEntities.Contains(type) ||
tablePerClassHierarchyEntities.Contains(type) ||
tablePerClassHierarchyJoinEntities.Contains(type) ||
- tablePerConcreteClassEntities.Contains(type);
+ tablePerConcreteClassEntities.Contains(type) ||
+ HasDelayedEntityRegistration(type)
+ ;
}
public bool IsTablePerClass(System.Type type)
@@ -556,5 +558,10 @@
registration(type);
}
}
+
+ private bool HasDelayedEntityRegistration(System.Type type)
+ {
+ return delayedEntityRegistrations.ContainsKey(type);
+ }
}
}
\ No newline at end of file
Modified: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassSequenceRegistrationTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassSequenceRegistrationTests.cs 2011-04-02 21:18:48 UTC (rev 5584)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassSequenceRegistrationTests.cs 2011-04-02 21:26:20 UTC (rev 5585)
@@ -33,5 +33,14 @@
inspector.Executing(x => x.IsTablePerClass(typeof(Inherited1))).Throws<MappingException>();
}
+
+ [Test]
+ public void WhenRegisterJoinedSubclassWithNoRootThenCanAskForIsEntity()
+ {
+ var inspector = new ExplicitlyDeclaredModel();
+ inspector.AddAsTablePerClassEntity(typeof(Inherited1));
+
+ inspector.IsEntity(typeof(Inherited1)).Should().Be.True();
+ }
}
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|