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

MapStruct throws an exception during collection update mapping when target is immutable and there is no target read accessor #1359

Closed
filiphr opened this issue Dec 20, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@filiphr
Copy link
Member

filiphr commented Dec 20, 2017

The error happens when we have something like:

public class Source {

    public Set<String> getProperty() {
    }
}

public class Target {

    public void setProperty(Set<String> property) {
    }
}

A workaround is to set the Mapper#collectionMappingStrategy to CollectionMappingStrategy.TARGET_IMMUTABLE

@filiphr filiphr added the bug label Dec 20, 2017
@filiphr filiphr added this to the 1.3.x milestone Dec 20, 2017
@filiphr filiphr self-assigned this Apr 2, 2018
filiphr added a commit to filiphr/mapstruct that referenced this issue Apr 2, 2018
filiphr added a commit that referenced this issue Apr 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant