MapsterMapper / MapsterMapper/Mapster

How can I obtain the changed field values after mapping two entities?

Open
#692 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C#
Stars
5.2k
Forks
410
Avg merge
2d 12h
Merged PRs (30d)
6

Description

Hi,
I would like to know which fields have been changed after mapping entities using [Mapster], in order to facilitate the creation of audit logs in the future. Does Mapster currently support this feature or will it support it in the future?

Eq:
```csharp
var car = new Car
{
Name = "my car",
NumberOfSeats = 5,
Color = CarColor.Blue,
Manufacturer = new Manufacturer(1, "best manufacturer"),
};

var carDto = new CarDto
{
Name = "your car",
NumberOfSeats = 6,
Color = CarColor.Black,
Manufacturer = new Manufacturer(1, "best manufacturer"),
};`

audit log like this:
Name: my car -> your car,
NumberOfSeats: 5 -> 6
Color: CarColor.Blue -> CarColor.Black

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

The issue names no implementation files, tests, or entry points. Start by reviewing Mapster's mapping APIs and existing documentation for change tracking or audit support, then determine whether the requested behavior is in scope and how completion could be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.