Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed the Table overload which defined <join>s to actually be calle…

…d Join
  • Loading branch information...
commit 3ea8d85a387bf4a5a019a0949ca9e370b23a5872 1 parent 3109c19
@jagregory jagregory authored
View
2  src/FluentNHibernate.Testing/DomainModel/Mapping/ClassMapXmlCreationTester.cs
@@ -364,7 +364,7 @@ public void CanSetSchema()
public void SpanningClassAcrossTwoTables()
{
new MappingTester<MappedObject>()
- .ForMapping(m => m.Table("tableTwo", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("tableTwo", t => t.Map(x => x.Name)))
.Element("class/join").Exists();
}
View
16 src/FluentNHibernate.Testing/DomainModel/Mapping/JoinPartTester.cs
@@ -10,7 +10,7 @@ public class JoinPartTester
public void CreatesJoinElement()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join").Exists();
}
@@ -18,7 +18,7 @@ public void CreatesJoinElement()
public void JoinElementHasTableName()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join").HasAttribute("table", "myTable");
}
@@ -26,7 +26,7 @@ public void JoinElementHasTableName()
public void PropertiesInJoinAreOutputInTheJoinElement()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join/property").HasAttribute("name", "Name");
}
@@ -37,7 +37,7 @@ public void PropertiesDefinedInClassAndPropertiesDefinedInJoinAreSeparateInOutpu
.ForMapping(m =>
{
m.Map(x => x.Name);
- m.Table("myTable", t => t.Map(x => x.CustomerName));
+ m.Join("myTable", t => t.Map(x => x.CustomerName));
})
.Element("class/property").HasAttribute("name", "Name")
.Element("class/join/property").HasAttribute("name", "CustomerName");
@@ -47,7 +47,7 @@ public void PropertiesDefinedInClassAndPropertiesDefinedInJoinAreSeparateInOutpu
public void JoinElementAlwaysHasAKey()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join/key").Exists();
}
@@ -55,7 +55,7 @@ public void JoinElementAlwaysHasAKey()
public void KeyDefaultsToClassNameId()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join/key/column").HasAttribute("name", "JoinTargetID");
}
@@ -63,7 +63,7 @@ public void KeyDefaultsToClassNameId()
public void CanOverrideKey()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.KeyColumn("ID")))
+ .ForMapping(m => m.Join("myTable", t => t.KeyColumn("ID")))
.Element("class/join/key/column").HasAttribute("name", "ID");
}
@@ -76,7 +76,7 @@ public void JoinIsAlwaysLastInTheClassElement()
{
m.Map(x => x.Name);
m.HasMany(x => x.Children);
- m.Table("myTable", t => t.KeyColumn("ID"));
+ m.Join("myTable", t => t.KeyColumn("ID"));
})
.Element("class/*[last()]").HasName("join");
}
View
2  src/FluentNHibernate/Mapping/ClassMap.cs
@@ -249,7 +249,7 @@ public void LazyLoad()
/// </summary>
/// <param name="tableName">Joined table name</param>
/// <param name="action">Joined table mapping</param>
- public void Table(string tableName, Action<JoinPart<T>> action)
+ public void Join(string tableName, Action<JoinPart<T>> action)
{
var join = new JoinPart<T>(tableName);
action(join);
Please sign in to comment.
Something went wrong with that request. Please try again.