You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SQL code shown for configuring the table-per-concrete-type (TPC) mapping strategy is not correct, because the two tables, Students and Employees, have a foreign key (FK) constraint for the People table, however that table is not needed in this mapping strategy.
Maybe this was copied over from the table-per-type (TPT) mapping strategy example on page 90, which has a similar SQL code.
The note box below the SQL code on page 91 talks about the PersonIds sequence, however that is not shown in the SQL code.
Besides, the SQL code in page 91 doesn't match with the output shown in page 99, step 17, which is the result of using the UseTpcMappingStrategy method, in the console app for using this strategy.
Suggested solution:
Remove the FK constraint on each table.
Add the CREATE SEQUENCE [PersonIds] in the SQL code of page 91.
I'm not sure if this is already fixed in recent editions of the book, or in the upcoming version for .NET 8.
By the way, thanks for the book, it's a formidable resource so far! I'm looking forward to buying the .NET 8 version soon.
The text was updated successfully, but these errors were encountered:
Chapter: 2
Page Number: 91
Section Title: Table-per-concrete-type (TPC) mapping strategy
Problem to fix:
Suggested solution:
I'm not sure if this is already fixed in recent editions of the book, or in the upcoming version for .NET 8.
By the way, thanks for the book, it's a formidable resource so far! I'm looking forward to buying the .NET 8 version soon.
The text was updated successfully, but these errors were encountered: