WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit b1d6fa2

Browse files
authored
Fix validation for TPC. (#128)
Based on dotnet/efcore#33371.
1 parent bcc403d commit b1d6fa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FirebirdSql.EntityFrameworkCore.Firebird/Infrastructure/Internal/FbModelValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public FbModelValidator(ModelValidatorDependencies dependencies, RelationalModel
3232

3333
protected override void ValidateValueGeneration(IEntityType entityType, IKey key, IDiagnosticsLogger<DbLoggerCategory.Model.Validation> logger)
3434
{
35-
if (entityType.GetTableName() != null && (string)entityType[RelationalAnnotationNames.MappingStrategy] == RelationalAnnotationNames.TpcMappingStrategy)
35+
if (entityType.GetMappingStrategy() == RelationalAnnotationNames.TpcMappingStrategy && entityType.BaseType == null)
3636
{
3737
foreach (var storeGeneratedProperty in key.Properties.Where(p => (p.ValueGenerated & ValueGenerated.OnAdd) != 0 && p.GetValueGenerationStrategy() == FbValueGenerationStrategy.IdentityColumn))
3838
{

0 commit comments

Comments
 (0)