abpframework / abpframework/abp

Consider to remove setters from audit interface properties

Open
#5,076 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

abp-framework breaking change enhancement priority:normal
Dominant language
C#
Stars
14.4k
Forks
3.7k
Avg merge
15h 32m
Merged PRs (30d)
106

Description

For example, IHasCreationTime (or ICreationAuditedObject) requires to add a public setter for the CreationTime. However, the creation time should not set later. It is only set when the entity is being created, and generally set by the ABP Framework.

We should consider to remove public setters from these interfaces to let the developer to be able to have private setters. ABP Framework then can use reflection to set them (just like done for the GUID Id properties for entities)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the IHasCreationTime and ICreationAuditedObject interfaces described in the issue, then compare their behavior with the entity identifier handling in framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs. Determine the complete set of affected audit interfaces and verify that the framework can still initialize their values when implementations use private setters.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.