{"record":{"id":"ceb11654385ac5bd","repo":"dotnet/efcore","slug":"entitytype1-property1-and-entitytype2-pr-ceb116","errorCode":null,"errorMessage":"'{entityType1}.{property1}' and '{entityType2}.{property2}' are both mapped to column '{columnName}' in '{table}', but have different concurrency token configurations.","messagePattern":"'(.+?)\\.(.+?)' and '(.+?)\\.(.+?)' are both mapped to column '(.+?)' in '(.+?)', but have different concurrency token configurations\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/EFCore.Relational/Infrastructure/RelationalModelValidator.cs","lineNumber":1620,"sourceCode":"        var currentScale = property.GetScale(storeObject);\n        var previousScale = duplicateProperty.GetScale(storeObject);\n        if (currentScale != previousScale)\n        {\n            throw new InvalidOperationException(\n                RelationalStrings.DuplicateColumnNameScaleMismatch(\n                    duplicateProperty.DeclaringType.DisplayName(),\n                    duplicateProperty.Name,\n                    property.DeclaringType.DisplayName(),\n                    property.Name,\n                    columnName,\n                    storeObject.DisplayName(),\n                    currentScale,\n                    previousScale));\n        }\n\n        if (property.IsConcurrencyToken != duplicateProperty.IsConcurrencyToken)\n        {\n            throw new InvalidOperationException(\n                RelationalStrings.DuplicateColumnNameConcurrencyTokenMismatch(\n                    duplicateProperty.DeclaringType.DisplayName(),\n                    duplicateProperty.Name,\n                    property.DeclaringType.DisplayName(),\n                    property.Name,\n                    columnName,\n                    storeObject.DisplayName()));\n        }\n\n        var currentTypeString = property.GetColumnType(storeObject);\n        var previousTypeString = duplicateProperty.GetColumnType(storeObject);\n        if (!string.Equals(currentTypeString, previousTypeString, StringComparison.OrdinalIgnoreCase))\n        {\n            throw new InvalidOperationException(\n                RelationalStrings.DuplicateColumnNameDataTypeMismatch(\n                    duplicateProperty.DeclaringType.DisplayName(),\n                    duplicateProperty.Name,\n                    property.DeclaringType.DisplayName(),","sourceCodeStart":1602,"sourceCodeEnd":1638,"githubUrl":"https://github.com/dotnet/efcore/blob/3a2006ef569de08368d59db5e1468aa8f407e4f8/src/EFCore.Relational/Infrastructure/RelationalModelValidator.cs#L1602-L1638","documentation":"Two properties mapped to the same column disagree on IsConcurrencyToken. Because the column backs a single physical store column, EF cannot honor one side's optimistic-concurrency check while ignoring the other's, so it rejects the model. Note this is independent of the store-generated token sharing handled separately.","triggerScenarios":"ValidateCompatible() checks property.IsConcurrencyToken != duplicateProperty.IsConcurrencyToken on two properties sharing a column. One was marked IsConcurrencyToken(true) (or [Timestamp]) and the other was not.","commonSituations":"Table-splitting where the principal's token column overlaps with a dependent property but only one side opts into concurrency checking; refactoring that moved a token onto only one half of a split table.","solutions":["Mark both properties as concurrency tokens (IsConcurrencyToken(true) on both).","Remove IsConcurrencyToken from the side that does not need it so both match.","If only one side should track concurrency, remap the other property to its own column."],"exampleFix":"// before\nmodelBuilder.Entity<Document>().Property(d => d.Version).IsConcurrencyToken();\nmodelBuilder.Entity<DocumentBlob>().Property(b => b.Version); // shared column, not a token\n\n// after\nmodelBuilder.Entity<Document>().Property(d => d.Version).IsConcurrencyToken();\nmodelBuilder.Entity<DocumentBlob>().Property(b => b.Version).IsConcurrencyToken();","handlingStrategy":"validation","validationCode":"foreach (var (col, props) in sharedColumnGroups)\n{\n    var flags = props.Select(p => p.IsConcurrencyToken).Distinct().ToList();\n    if (flags.Count > 1)\n        Console.WriteLine($\"Column {col} has conflicting concurrency-token settings\");\n}","typeGuard":null,"tryCatchPattern":"try { _ = db.Model; } catch (InvalidOperationException ex) when (ex.Message.Contains(\"different concurrency token configurations\")) { // make IsConcurrencyToken consistent on both properties }","preventionTips":["Mark the same property as a concurrency token on every entity that shares its column.","Be aware [Timestamp] implies IsConcurrencyToken; apply consistently.","Smoke-test the model at startup."],"tags":["model-validation","column-mapping","concurrency-token","relational"],"backgroundTag":null,"analyzedSha":"3a2006ef569de08368d59db5e1468aa8f407e4f8","analyzedAt":"2026-08-11T23:42:04.146Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}