Skip to content

Commit bc36225

Browse files
committed
changed id mapping from native to assigned and modified NorthwindDbCreator accordingly
1 parent 0bf6e35 commit bc36225

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/NHibernate.DomainModel/Northwind/Mappings/TimeSheet.hbm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<class name="TimesheetEntry" table="TimesheetEntries">
2323
<id name="Id" column="TimesheetEntryId">
24-
<generator class="native" />
24+
<generator class="assigned" />
2525
</id>
2626

2727
<property name="EntryDate" />

src/NHibernate.Test/Linq/NorthwindDbCreator.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,14 @@ public static void CreateMiscTestData(ISession session)
8787
{
8888
new TimesheetEntry
8989
{
90+
Id = 1,
9091
EntryDate = KnownDate,
9192
NumberOfHours = 6,
9293
Comments = "testing 123"
9394
},
9495
new TimesheetEntry
9596
{
97+
Id = 2,
9698
EntryDate = KnownDate.AddDays(1),
9799
NumberOfHours = 14
98100
}
@@ -107,22 +109,26 @@ public static void CreateMiscTestData(ISession session)
107109
{
108110
new TimesheetEntry
109111
{
112+
Id = 3,
110113
EntryDate = DateTime.Now.AddMinutes(20),
111114
NumberOfHours = 4
112115
},
113116
new TimesheetEntry
114117
{
118+
Id = 4,
115119
EntryDate = DateTime.Now.AddMinutes(10),
116120
NumberOfHours = 8,
117121
Comments = "testing 456"
118122
},
119123
new TimesheetEntry
120124
{
125+
Id = 5,
121126
EntryDate = DateTime.Now.AddMinutes(13),
122127
NumberOfHours = 7
123128
},
124129
new TimesheetEntry
125130
{
131+
Id = 6,
126132
EntryDate = DateTime.Now.AddMinutes(45),
127133
NumberOfHours = 38
128134
}

0 commit comments

Comments
 (0)