|
From: <fab...@us...> - 2011-04-03 19:15:24
|
Revision: 5599
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5599&view=rev
Author: fabiomaulo
Date: 2011-04-03 19:15:17 +0000 (Sun, 03 Apr 2011)
Log Message:
-----------
Removed not well thought possible API
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs
trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelExplicitDeclarationsHolder.cs
trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelInspector.cs
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/ComponentMappingRegistrationTests.cs
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassMappingStrategyTests.cs
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/RootClassMappingStrategyTests.cs
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassMappingStrategyTests.cs
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/UnionSubclassMappingStrategyTests.cs
trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
Removed Paths:
-------------
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinMappingStrategyTests.cs
trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinSequenceRegistrationTests.cs
Modified: trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate/Mapping/ByCode/ExplicitlyDeclaredModel.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -26,7 +26,6 @@
private readonly HashSet<MemberInfo> sets = new HashSet<MemberInfo>();
private readonly HashSet<System.Type> tablePerClassEntities = new HashSet<System.Type>();
private readonly HashSet<System.Type> tablePerClassHierarchyEntities = new HashSet<System.Type>();
- private readonly HashSet<System.Type> tablePerClassHierarchyJoinEntities = new HashSet<System.Type>();
private readonly HashSet<System.Type> tablePerConcreteClassEntities = new HashSet<System.Type>();
private readonly HashSet<MemberInfo> versionProperties = new HashSet<MemberInfo>();
private readonly Dictionary<System.Type, Action<System.Type>> delayedEntityRegistrations = new Dictionary<System.Type, Action<System.Type>>();
@@ -53,11 +52,6 @@
get { return tablePerClassHierarchyEntities; }
}
- public IEnumerable<System.Type> TablePerClassHierarchyJoinEntities
- {
- get { return tablePerClassHierarchyJoinEntities; }
- }
-
public IEnumerable<System.Type> TablePerConcreteClassEntities
{
get { return tablePerConcreteClassEntities; }
@@ -209,7 +203,7 @@
{
throw new MappingException(string.Format("Abiguous mapping of {0}. It was registered as root-entity and as subclass for table-per-class-hierarchy strategy", type.FullName));
}
- if (IsMappedFor(tablePerClassEntities, type) || tablePerClassHierarchyJoinEntities.Contains(type) || IsMappedFor(tablePerConcreteClassEntities, type))
+ if (IsMappedFor(tablePerClassEntities, type) || IsMappedFor(tablePerConcreteClassEntities, type))
{
throw new MappingException(string.Format("Abiguous mapping of {0}. It was registered with more than one class-hierarchy strategy", type.FullName));
}
@@ -225,41 +219,6 @@
}
}
- public void AddAsTablePerClassHierarchyJoinEntity(System.Type type)
- {
- AddAsTablePerClassHierarchyJoinEntity(type, false);
- }
-
- public void AddAsTablePerClassHierarchyJoinEntity(System.Type type, bool rootEntityMustExists)
- {
- if (IsComponent(type))
- {
- throw new MappingException(string.Format("Abiguous mapping of {0}. It was registered as entity and as component", type.FullName));
- }
- var rootEntity = GetRootEntityOrNull(type);
- if (rootEntity != null)
- {
- if (rootEntity.Equals(type))
- {
- throw new MappingException(string.Format("Abiguous mapping of {0}. It was registered as root-entity and as subclass for table-per-class-hierarchy strategy", type.FullName));
- }
- if (IsMappedFor(tablePerClassEntities, type) || IsMappedFor(tablePerClassHierarchyEntities, type) || IsMappedFor(tablePerConcreteClassEntities, type))
- {
- throw new MappingException(string.Format("Abiguous mapping of {0}. It was registered with more than one class-hierarchy strategy", type.FullName));
- }
- tablePerClassHierarchyEntities.Add(rootEntity);
- tablePerClassHierarchyJoinEntities.Add(type);
- }
- else
- {
- if (rootEntityMustExists)
- {
- throw new MappingException(string.Format("The root entity for {0} was never registered", type.FullName));
- }
- EnlistTypeRegistration(type, t => AddAsTablePerClassHierarchyJoinEntity(t, true));
- }
- }
-
public void AddAsTablePerConcreteClassEntity(System.Type type)
{
AddAsTablePerConcreteClassEntity(type, false);
@@ -415,12 +374,6 @@
return IsMappedFor(tablePerClassHierarchyEntities, type);
}
- public bool IsTablePerClassHierarchyJoin(System.Type type)
- {
- ExecuteDelayedTypeRegistration(type);
- return tablePerClassHierarchyJoinEntities.Contains(type);
- }
-
public bool IsTablePerConcreteClass(System.Type type)
{
ExecuteDelayedTypeRegistration(type);
Modified: trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelExplicitDeclarationsHolder.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelExplicitDeclarationsHolder.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelExplicitDeclarationsHolder.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -9,7 +9,6 @@
IEnumerable<System.Type> Components { get; }
IEnumerable<System.Type> TablePerClassEntities { get; }
IEnumerable<System.Type> TablePerClassHierarchyEntities { get; }
- IEnumerable<System.Type> TablePerClassHierarchyJoinEntities { get; }
IEnumerable<System.Type> TablePerConcreteClassEntities { get; }
IEnumerable<MemberInfo> OneToOneRelations { get; }
@@ -34,7 +33,6 @@
void AddAsComponent(System.Type type);
void AddAsTablePerClassEntity(System.Type type);
void AddAsTablePerClassHierarchyEntity(System.Type type);
- void AddAsTablePerClassHierarchyJoinEntity(System.Type type);
void AddAsTablePerConcreteClassEntity(System.Type type);
void AddAsOneToOneRelation(MemberInfo member);
Modified: trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelInspector.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelInspector.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate/Mapping/ByCode/IModelInspector.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -10,7 +10,6 @@
bool IsTablePerClass(System.Type type);
bool IsTablePerClassHierarchy(System.Type type);
- bool IsTablePerClassHierarchyJoin(System.Type type);
bool IsTablePerConcreteClass(System.Type type);
bool IsOneToOne(MemberInfo member);
Modified: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/ComponentMappingRegistrationTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/ComponentMappingRegistrationTests.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/ComponentMappingRegistrationTests.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -57,15 +57,6 @@
}
[Test]
- public void WhenRegisteredAsComponetThenCantRegisterAsSubclassJoin()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsComponent(typeof(MyComponent));
-
- inspector.Executing(x => x.AddAsTablePerClassHierarchyJoinEntity(typeof(MyComponent))).Throws<MappingException>();
- }
-
- [Test]
public void WhenRegisteredAsComponetThenCantRegisterAsUnionSubclass()
{
var inspector = new ExplicitlyDeclaredModel();
Modified: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassMappingStrategyTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassMappingStrategyTests.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/JoinedSubclassMappingStrategyTests.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -28,7 +28,6 @@
inspector.IsTablePerClass(typeof(Inherited1)).Should().Be.True();
inspector.IsTablePerClassHierarchy(typeof(Inherited1)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited1)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(Inherited1)).Should().Be.False();
}
@@ -41,7 +40,6 @@
inspector.IsTablePerClass(typeof(Inherited2)).Should().Be.True();
inspector.IsTablePerClassHierarchy(typeof(Inherited2)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited2)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(Inherited2)).Should().Be.False();
}
@@ -56,16 +54,6 @@
}
[Test]
- public void WhenRegisteredAsJoinedSubclassThenCantRegisterAsSubclassJoin()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassEntity(typeof(Inherited1));
-
- inspector.Executing(x => x.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1))).Throws<MappingException>();
- }
-
- [Test]
public void WhenRegisteredAsJoinedSubclassThenCantRegisterAsUnionSubclass()
{
var inspector = new ExplicitlyDeclaredModel();
Modified: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/RootClassMappingStrategyTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/RootClassMappingStrategyTests.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/RootClassMappingStrategyTests.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -26,7 +26,6 @@
inspector.AddAsRootEntity(typeof(MyClass));
inspector.IsTablePerClass(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.False();
}
@@ -38,7 +37,6 @@
inspector.AddAsTablePerClassEntity(typeof(Inherited1));
inspector.IsTablePerClass(typeof(MyClass)).Should().Be.True();
inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.False();
}
@@ -50,7 +48,6 @@
inspector.AddAsTablePerClassEntity(typeof(Inherited2));
inspector.IsTablePerClass(typeof(MyClass)).Should().Be.True();
inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.False();
}
@@ -62,7 +59,6 @@
inspector.AddAsTablePerClassHierarchyEntity(typeof(Inherited1));
inspector.IsTablePerClass(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.False();
}
@@ -75,37 +71,11 @@
inspector.IsTablePerClass(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.False();
}
- [Test]
- public void WhenRegisteredSubclassJoinThenTheStrategyIsDefinedEvenForRoot()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
- inspector.IsTablePerClass(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.False();
- }
-
[Test]
- public void WhenRegisteredDeepSubclassJoinThenTheStrategyIsDefinedEvenForRoot()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited2));
-
- inspector.IsTablePerClass(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.False();
- }
-
- [Test]
public void WhenRegisteredConcreteClassThenTheStrategyIsDefinedEvenForRoot()
{
var inspector = new ExplicitlyDeclaredModel();
@@ -114,7 +84,6 @@
inspector.IsTablePerClass(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.True();
}
@@ -127,7 +96,6 @@
inspector.IsTablePerClass(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(MyClass)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(MyClass)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(MyClass)).Should().Be.True();
}
Deleted: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinMappingStrategyTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinMappingStrategyTests.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinMappingStrategyTests.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -1,88 +0,0 @@
-using NHibernate.Mapping.ByCode;
-using NUnit.Framework;
-using SharpTestsEx;
-
-namespace NHibernate.Test.MappingByCode.ExplicitlyDeclaredModelTests
-{
- public class SubclassJoinMappingStrategyTests
- {
- private class MyClass
- {
-
- }
- private class Inherited1 : MyClass
- {
-
- }
- private class Inherited2 : Inherited1
- {
-
- }
-
- [Test]
- public void WhenRegisteredAsSubclassJoinThenIsRegistered()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
-
- inspector.IsTablePerClass(typeof(Inherited1)).Should().Be.False();
- inspector.IsTablePerClassHierarchy(typeof(Inherited1)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited1)).Should().Be.True();
- inspector.IsTablePerConcreteClass(typeof(Inherited1)).Should().Be.False();
- }
-
- [Test]
- public void WhenRegisteredAsDeepSubclassJoinThenIsRegistered()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited2));
-
- inspector.IsTablePerClass(typeof(Inherited2)).Should().Be.False();
- inspector.IsTablePerClassHierarchy(typeof(Inherited2)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited2)).Should().Be.True();
- inspector.IsTablePerConcreteClass(typeof(Inherited2)).Should().Be.False();
- }
-
- [Test]
- public void WhenRegisteredAsSubclassJoinThenCantRegisterAsJoinedSubclass()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
-
- inspector.Executing(x => x.AddAsTablePerClassEntity(typeof(Inherited1))).Throws<MappingException>();
- }
-
- [Test]
- public void WhenRegisteredAsSubclassJoinThenCantRegisterAsSubclass()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
-
- inspector.Executing(x => x.AddAsTablePerClassHierarchyEntity(typeof(Inherited1))).Throws<MappingException>();
- }
-
- [Test]
- public void WhenRegisteredAsSubclassJoinThenCantRegisterAsUnionSubclass()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
-
- inspector.Executing(x => x.AddAsTablePerConcreteClassEntity(typeof(Inherited1))).Throws<MappingException>();
- }
-
- [Test]
- public void WhenRegisteredAsSubclassJoinThenIsEntity()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
-
- inspector.IsEntity(typeof(Inherited1)).Should().Be.True();
- }
- }
-}
\ No newline at end of file
Deleted: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinSequenceRegistrationTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinSequenceRegistrationTests.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassJoinSequenceRegistrationTests.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -1,37 +0,0 @@
-using NHibernate.Mapping.ByCode;
-using NUnit.Framework;
-using SharpTestsEx;
-
-namespace NHibernate.Test.MappingByCode.ExplicitlyDeclaredModelTests
-{
- public class SubclassJoinSequenceRegistrationTests
- {
- private class MyClass
- {
-
- }
- private class Inherited1 : MyClass
- {
-
- }
-
- [Test]
- public void WhenRegisterSubclassJoinBeforeRootThenIsRegistered()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
-
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited1)).Should().Be.True();
- }
-
- [Test]
- public void WhenRegisterSubclassWithNoRootThenThrows()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1));
-
- inspector.Executing(x => x.IsTablePerClassHierarchyJoin(typeof(Inherited1))).Throws<MappingException>();
- }
- }
-}
\ No newline at end of file
Modified: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassMappingStrategyTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassMappingStrategyTests.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/SubclassMappingStrategyTests.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -28,7 +28,6 @@
inspector.IsTablePerClass(typeof(Inherited1)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(Inherited1)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited1)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(Inherited1)).Should().Be.False();
}
@@ -41,7 +40,6 @@
inspector.IsTablePerClass(typeof(Inherited2)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(Inherited2)).Should().Be.True();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited2)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(Inherited2)).Should().Be.False();
}
@@ -56,16 +54,6 @@
}
[Test]
- public void WhenRegisteredAsSubclassThenCantRegisterAsSubclassJoin()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerClassHierarchyEntity(typeof(Inherited1));
-
- inspector.Executing(x => x.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1))).Throws<MappingException>();
- }
-
- [Test]
public void WhenRegisteredAsSubclassThenCantRegisterAsUnionSubclass()
{
var inspector = new ExplicitlyDeclaredModel();
Modified: trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/UnionSubclassMappingStrategyTests.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/UnionSubclassMappingStrategyTests.cs 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/MappingByCode/ExplicitlyDeclaredModelTests/UnionSubclassMappingStrategyTests.cs 2011-04-03 19:15:17 UTC (rev 5599)
@@ -28,7 +28,6 @@
inspector.IsTablePerClass(typeof(Inherited1)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(Inherited1)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited1)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(Inherited1)).Should().Be.True();
}
@@ -41,7 +40,6 @@
inspector.IsTablePerClass(typeof(Inherited2)).Should().Be.False();
inspector.IsTablePerClassHierarchy(typeof(Inherited2)).Should().Be.False();
- inspector.IsTablePerClassHierarchyJoin(typeof(Inherited2)).Should().Be.False();
inspector.IsTablePerConcreteClass(typeof(Inherited2)).Should().Be.True();
}
@@ -56,16 +54,6 @@
}
[Test]
- public void WhenRegisteredAsUnionSubclassThenCantRegisterAsSubclassJoin()
- {
- var inspector = new ExplicitlyDeclaredModel();
- inspector.AddAsRootEntity(typeof(MyClass));
- inspector.AddAsTablePerConcreteClassEntity(typeof(Inherited1));
-
- inspector.Executing(x => x.AddAsTablePerClassHierarchyJoinEntity(typeof(Inherited1))).Throws<MappingException>();
- }
-
- [Test]
public void WhenRegisteredAsUnionSubclassThenCantRegisterAsJoinedSubclass()
{
var inspector = new ExplicitlyDeclaredModel();
Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-04-03 17:53:11 UTC (rev 5598)
+++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-04-03 19:15:17 UTC (rev 5599)
@@ -512,8 +512,6 @@
<Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\JoinedSubclassMappingStrategyTests.cs" />
<Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\JoinedSubclassSequenceRegistrationTests.cs" />
<Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\RootClassMappingStrategyTests.cs" />
- <Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\SubclassJoinMappingStrategyTests.cs" />
- <Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\SubclassJoinSequenceRegistrationTests.cs" />
<Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\SubclassMappingStrategyTests.cs" />
<Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\SubclassSequenceRegistrationTests.cs" />
<Compile Include="MappingByCode\ExplicitlyDeclaredModelTests\UnionSubclassMappingStrategyTests.cs" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|