Skip to content

Commit 358522b

Browse files
committed
Clean up and fix SqlServerCe
1 parent 7e1faee commit 358522b

File tree

3 files changed

+45
-42
lines changed

3 files changed

+45
-42
lines changed

src/NHibernate.Test/Async/NHSpecificTest/NH3813/FixtureByCode.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ protected override Cfg.MappingSchema.HbmMapping GetMappings()
2929
m.Lazy(false);
3030

3131
m.Id(
32-
i => i.ID,
32+
i => i.Id,
3333
id =>
3434
{
3535
id.Column("ID");
3636
id.Generator(Generators.Identity);
3737
});
38+
m.Property(x => x.Name);
3839

3940
m.Bag(
4041
b => b.AssociationTableCollection,
@@ -52,12 +53,13 @@ protected override Cfg.MappingSchema.HbmMapping GetMappings()
5253
m.Lazy(false);
5354

5455
m.Id(
55-
i => i.ID,
56+
i => i.Id,
5657
id =>
5758
{
5859
id.Column("ID");
5960
id.Generator(Generators.Identity);
6061
});
62+
m.Property(x => x.Name);
6163
});
6264

6365
mapper.Class<AssociationTable>(
@@ -67,9 +69,9 @@ protected override Cfg.MappingSchema.HbmMapping GetMappings()
6769
i =>
6870
{
6971
i.ManyToOne(c => c.FirstTable, p => { p.Column("FirstTableID"); });
70-
7172
i.ManyToOne(c => c.OtherTable, p => { p.Column("OtherTableID"); });
7273
});
74+
m.Property(x => x.Name);
7375
});
7476

7577
return mapper.CompileMappingForAllExplicitlyAddedEntities();
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Collections.Generic;
2+
3+
namespace NHibernate.Test.NHSpecificTest.NH3813
4+
{
5+
public class AssociationTable
6+
{
7+
public virtual FirstTable FirstTable { get; set; }
8+
public virtual OtherTable OtherTable { get; set; }
9+
public virtual string Name { get; set; }
10+
11+
public override bool Equals(object obj)
12+
{
13+
return base.Equals(obj);
14+
}
15+
16+
public override int GetHashCode()
17+
{
18+
return base.GetHashCode();
19+
}
20+
}
21+
22+
public class FirstTable
23+
{
24+
public virtual int Id { get; set; }
25+
public virtual string Name { get; set; }
26+
27+
public virtual IList<AssociationTable> AssociationTableCollection { get; set; } = new List<AssociationTable>();
28+
}
29+
30+
public class OtherTable
31+
{
32+
public virtual int Id { get; set; }
33+
public virtual string Name { get; set; }
34+
}
35+
}

src/NHibernate.Test/NHSpecificTest/NH3813/FixtureByCode.cs

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ protected override Cfg.MappingSchema.HbmMapping GetMappings()
1818
m.Lazy(false);
1919

2020
m.Id(
21-
i => i.ID,
21+
i => i.Id,
2222
id =>
2323
{
2424
id.Column("ID");
2525
id.Generator(Generators.Identity);
2626
});
27+
m.Property(x => x.Name);
2728

2829
m.Bag(
2930
b => b.AssociationTableCollection,
@@ -41,12 +42,13 @@ protected override Cfg.MappingSchema.HbmMapping GetMappings()
4142
m.Lazy(false);
4243

4344
m.Id(
44-
i => i.ID,
45+
i => i.Id,
4546
id =>
4647
{
4748
id.Column("ID");
4849
id.Generator(Generators.Identity);
4950
});
51+
m.Property(x => x.Name);
5052
});
5153

5254
mapper.Class<AssociationTable>(
@@ -56,9 +58,9 @@ protected override Cfg.MappingSchema.HbmMapping GetMappings()
5658
i =>
5759
{
5860
i.ManyToOne(c => c.FirstTable, p => { p.Column("FirstTableID"); });
59-
6061
i.ManyToOne(c => c.OtherTable, p => { p.Column("OtherTableID"); });
6162
});
63+
m.Property(x => x.Name);
6264
});
6365

6466
return mapper.CompileMappingForAllExplicitlyAddedEntities();
@@ -179,40 +181,4 @@ protected override void OnTearDown()
179181
base.OnTearDown();
180182
}
181183
}
182-
183-
public class FirstTable
184-
{
185-
public virtual int ID { get; set; }
186-
187-
public virtual IList<AssociationTable> AssociationTableCollection { get; set; }
188-
189-
public FirstTable()
190-
{
191-
this.AssociationTableCollection = new List<AssociationTable>();
192-
}
193-
}
194-
195-
public class OtherTable
196-
{
197-
public virtual int ID { get; set; }
198-
}
199-
200-
public class AssociationTable
201-
{
202-
public virtual int FirstTableID { get; set; }
203-
public virtual FirstTable FirstTable { get; set; }
204-
205-
public virtual int OtherTableID { get; set; }
206-
public virtual OtherTable OtherTable { get; set; }
207-
208-
public override bool Equals(object obj)
209-
{
210-
return base.Equals(obj);
211-
}
212-
213-
public override int GetHashCode()
214-
{
215-
return base.GetHashCode();
216-
}
217-
}
218184
}

0 commit comments

Comments
 (0)