Skip to content

Commit ae6d299

Browse files
hazzikoskarb
authored andcommitted
NH-3874 - Make test pass for SqlServer CE.
SqlServer CE could not handle tables with single column which is an identity primary key.
1 parent a3e1f5c commit ae6d299

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/NHibernate.Test/NHSpecificTest/NH3874/Fixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected override void OnSetUp()
1818
using (var session = OpenSession())
1919
using (var tx = session.BeginTransaction())
2020
{
21-
var one = new One();
21+
var one = new One { Name = "One" };
2222
var two = new Two { One = one };
2323
two.One.Twos = new[] { two };
2424
_id = session.Save(one);

src/NHibernate.Test/NHSpecificTest/NH3874/Mappings.hbm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<id name="Id" column="Zzzz" type="IntWrapperType">
99
<generator class="identity"/>
1010
</id>
11-
11+
<property name="Name" />
1212
<bag name="Twos" cascade="all-delete-orphan" inverse="true" lazy="true">
1313
<key column="WeirdId"/>
1414
<one-to-many class="Two"/>

src/NHibernate.Test/NHSpecificTest/NH3874/One.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ public class One
66
{
77
public virtual IntWrapper Id { get; set; }
88

9+
public virtual string Name { get; set; }
10+
911
public virtual IList<Two> Twos { get; set; }
1012
}
1113
}

0 commit comments

Comments
 (0)