Skip to content

Commit 97aa837

Browse files
committed
added test for index base offset of lists
1 parent 2b95151 commit 97aa837

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/FluentNHibernate.Testing/DomainModel/Mapping/OneToManyTester.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,20 @@ public void CanSpecifyIndexColumnAndTypeForList()
277277
.Element("class/list/index/column").HasAttribute("name", "ListIndex");
278278
}
279279

280+
[Test]
281+
public void CanSpecifyIndexBaseOffsetAndColumnForList()
282+
{
283+
new MappingTester<OneToManyTarget>()
284+
.ForMapping(map => map.HasMany(x => x.ListOfChildren)
285+
.AsList(index =>
286+
{
287+
index.Base(1);
288+
index.Column("ListIndex");
289+
}))
290+
.Element("class/list/list-index").HasAttribute("base", 1)
291+
.Element("class/list/list-index/column").HasAttribute("name", "ListIndex");
292+
}
293+
280294
[Test]
281295
public void CanSetTableName()
282296
{

0 commit comments

Comments
 (0)