Skip to content
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

Map to existing object? #119

Open
VILLAN3LL3 opened this issue Feb 26, 2025 · 1 comment
Open

Map to existing object? #119

VILLAN3LL3 opened this issue Feb 26, 2025 · 1 comment

Comments

@VILLAN3LL3
Copy link

Is it possible to create a mapper to map to an existing object?

Example (MapStruct):

@Mapping(target = "foo", source = "bar")
fun mapToExistingObject(@MappingTarget existingTargetObject: TargetObject, source: SourceObject)
@mcarleio
Copy link
Owner

Currently this is not possible, but I want to add such a functionality to Konvert, as you do not always have the option to create a new instance of the target but have to work with existing instances.

But there is currently no timeline for when I come to implement that. If someone wants to work on this, I am open for a PR 👍

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

No branches or pull requests

2 participants