- ABP Framework version: v6.0.1
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Auth Server Separated (Angular): Tired
- Exception message and stack trace:
- Steps to reproduce the issue:"
Hi, I have a class that inherits from the "FullAuditedAggregateRoot<Guid>" class. This inherited class already provides me with the "CreatorId" field, but it is of type Guid? I would like this field to be mandatory, how could I do it?
5 Answer(s)
-
0
If I need the CreatorId property to be mandatory, what would you recommend I do?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
You can't do this. This is hardcoded in the base class. Changing it will cause other problems. Because all modules consider it to be
nullable.Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
What we really want to do is ensure that a user cannot be deleted if they have created reports, since we would lose the traceability of who made said report. What do you propose to do?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
hi
ensure that a user cannot be deleted if they have created reports,
You can check the user's reports before deleting a user.
If there are any reports, throw user-friendly/business exceptions.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)