Ends in:
0 DAY
12 HRS
53 MIN
43 SEC
Ends in:
0 D
12 H
53 M
43 S
Open Closed

Why Entity Created with AuditedEntity doesn't linked to AbpUser table ? #1388


User avatar
0
selinkoykiran created
  • ABP Framework version: v4.3.0
  • UI type: MVC
  • DB provider: EF Core
  • **Tiered (MVC) **: yes

Hello , I have an entity which implements AuditedEntity<Guid> abp class. When generated entity from this interface automatically CreatorId, CreationTime columns generated in the database with migration. But they are not linked to AbpUser table there aren't any relation or foreign key between this entity and abpUser table. So when I want to display creator name of the entity in screen I only can get Guid CreatorId and it is useless for end user. So when I want to access creatorName property , do I have to add manually below property into my entity for create relation between AbpUser table and can include User table ?

public IdentityUser Creator { get; protected set; }

Or Is there another way to solve this thing ?

Thank you.


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    According to the design, the audit log may be stored in different databases. Even in MongoDb.

    So we do not recommend you to create a relationship for them. You can query the user's info based on the CreatorId.

  • User Avatar
    0
    selinkoykiran created

    Ok , I got it Thank you for explanation.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19