Skip to content

Fix order of target and source in mapping annotation #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TrianguloY
Copy link

Based on this discussion (https://groups.google.com/g/mapstruct-users/c/dM_ZGPJ_JlU/m/K8Gh0gybBQAJ) it appears that exists a non-written (?) rule saying that the standard way to write mappings is target, source (and not source, target).

A previous PR (mapstruct/mapstruct#2369) fixed the web documentation, but the example code on this repo remained unchanged.

This pr's purpose is just to switch the @Mapping(source,target) into @Mapping(target,source).
But additionally, for consistency, I also changed the @ValueMapping(source,target) into @ValueMapping(target,source). If this second change is not desired, I can just revert that individual commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant