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
Define a BankAccount entity with a RowVersion property for concurrency control.
Configure the RowVersion property using .IsRowVersion().
Attempt to save a BankAccount entity to the PostgreSQL database without initializing RowVersion.
Expected Behavior:
Entity should be saved with the RowVersion property automatically managed by Entity Framework Core.
Actual Behavior:
Error message: Npgsql.PostgresException (0x80004005): 23502: null value in column "RowVersion" of relation "BankAccounts" violates not-null constraint.
Full Error Message:
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
---> Npgsql.PostgresException (0x80004005): 23502: null value in column "RowVersion" of relation "BankAccounts" violates not-null constraint
Environment Details:
dotnet-ef
Version: 9.0.0Steps to Reproduce:
BankAccount
entity with aRowVersion
property for concurrency control.RowVersion
property using.IsRowVersion()
.BankAccount
entity to the PostgreSQL database without initializingRowVersion
.Expected Behavior:
Entity should be saved with the
RowVersion
property automatically managed by Entity Framework Core.Actual Behavior:
Error message:
Npgsql.PostgresException (0x80004005): 23502: null value in column "RowVersion" of relation "BankAccounts" violates not-null constraint
.Full Error Message:
Code Examples:
Entity Configuration:
DbContext Configuration:
Additional Context:
RowVersion
property is configured for concurrency control using.IsRowVersion()
.RowVersion
property is properly defined in the entity model and DbContext.The text was updated successfully, but these errors were encountered: