abp icon indicating copy to clipboard operation
abp copied to clipboard

Blazor UI Project: FullAuditedEntity not saving some Audit Fields

Open 274188A opened this issue 6 years ago • 7 comments

Example: Entity is defined as:

 public class Gender : FullAuditedEntity<Guid>
    {
       //<snipped/>
    }

However when an Entity is created, modified, or deleted, the columns associated with the user remain NULL

Example: CreatorId, LastModifier and DeleterId are not being persisted as expected.

image

274188A avatar Oct 06 '20 13:10 274188A

Hi @274188A

This is not related for Blazor UI,

But I've tested it on Blazor and couldn't see any problem. And I see the the LastModificationTime is recorded.

image

Is there any login issue for your case, did you check it?

cotur avatar Oct 08 '20 10:10 cotur

Agree nor related to Blazor - i'm sorry for that mistake.

There are no login issues. I'm still trying to pass the id back to the AppService inside the dto but no luck so far.

I'm still checking/investigating...

274188A avatar Oct 08 '20 12:10 274188A

Just checked the Sample for BlazorUI and it has the same problem...

274188A avatar Oct 08 '20 13:10 274188A

I could not reproduce it on BookStore-Blazor-EfCore sample application. It works as expected. (I've created new book and edited that book entity)

image

cotur avatar Oct 08 '20 14:10 cotur

Yes - i agree with your findings - must be some error in my code - I'm not using AuditedAggregateRoot though...

274188A avatar Oct 09 '20 00:10 274188A

I have found something interesting. Yes it works with AuditedAggregateRoot<T> bu not with FullAuditedEntity<T>.

Can you please check if you also have same results?

274188A avatar Oct 09 '20 01:10 274188A

Found my error - thanks for your time - all good

274188A avatar Oct 09 '20 01:10 274188A