Abp: IsDeleted Error (Cannot insert the value NULL into column 'IsDeleted')

Created on 3 Apr 2020  路  7Comments  路  Source: abpframework/abp

Everything works fine when am using AuditedAggregateRoot , but when i switch to FullAuditedAggregateRoot i get error IsDeleted cannot be null. I thought abp takes care of this.

Note: Am not using default CRUD services.

Have even tried to set IsDeleted manually, but still i get error.

image

image

Most helpful comment

You might want to look in your [ProjectName]DbContextModelCreatingExtensions.cs to make sure you're configuring your entity properly. It should have ConfigureFullAuditedAggregateRoot() and also, you can add ConfigureSoftDelete() (If you need it) as well. Add a migration and update the DB.

All 7 comments

What database are you using?

MS SQL

Can you share a project that reproduces the problem?

It's a huge project, I have created a new two entity project and using crud services it works well. Let me look into sql profiling, unless you have any other idea on where I can check the failure point.

You might want to look in your [ProjectName]DbContextModelCreatingExtensions.cs to make sure you're configuring your entity properly. It should have ConfigureFullAuditedAggregateRoot() and also, you can add ConfigureSoftDelete() (If you need it) as well. Add a migration and update the DB.

ConfigureByConvention() configures the standard/base properties (like TenantId) and recommended to always call it.

@maliming @SoloHam worked like charm. thank you soo much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChangYinShung picture ChangYinShung  路  3Comments

hikalkan picture hikalkan  路  3Comments

ugurozturk picture ugurozturk  路  3Comments

hikalkan picture hikalkan  路  3Comments

leonkosak picture leonkosak  路  3Comments