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

1.2.0-Beta1 Automapping Feature: doesn't work with enums #1102

Closed
brabenetz opened this Issue Feb 26, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@brabenetz

brabenetz commented Feb 26, 2017

enums are not Mapped (Error "Consider to declare/implement a mapping method: ..."):
MapStructEnumMapper.java.txt

The Docu "mapstruct-reference-guide.asciidoc" says:

MapStruct will only create a new mapping method if and only if the source and target property
are  properties of a Bean and they themselves are Beans or simple properties.
i.e. they are not Collection or Map type properties.

Maybe enums doesn't fall under "simple properties"?

@sjaakd

This comment has been minimized.

Show comment
Hide comment
@sjaakd

sjaakd Feb 26, 2017

Contributor

@brabenetz .. In principle this is a missing feature.. The problem concerns enum mappings (which are not yet automatically generated). That's why we mentioned Bean in the text above.

But having said that, its a good idea to add this as well.

Contributor

sjaakd commented Feb 26, 2017

@brabenetz .. In principle this is a missing feature.. The problem concerns enum mappings (which are not yet automatically generated). That's why we mentioned Bean in the text above.

But having said that, its a good idea to add this as well.

@filiphr filiphr added the enhancement label Feb 27, 2017

@filiphr filiphr added this to the 1.2-next milestone Mar 1, 2017

filiphr added a commit to filiphr/mapstruct that referenced this issue Mar 1, 2017

filiphr added a commit to filiphr/mapstruct that referenced this issue Mar 2, 2017

filiphr added a commit to filiphr/mapstruct that referenced this issue Mar 2, 2017

@gunnarmorling

This comment has been minimized.

Show comment
Hide comment
@gunnarmorling

gunnarmorling Mar 2, 2017

Member

Makes sense.

Thanks a lot for testing the Beta and filing these reports/feature request, @brabenetz. Keep them coming :)

Member

gunnarmorling commented Mar 2, 2017

Makes sense.

Thanks a lot for testing the Beta and filing these reports/feature request, @brabenetz. Keep them coming :)

@brabenetz

This comment has been minimized.

Show comment
Hide comment
@brabenetz

brabenetz Mar 3, 2017

Thanks for the greate MapStruct Library! I'm sure I will use it more often in the future.

brabenetz commented Mar 3, 2017

Thanks for the greate MapStruct Library! I'm sure I will use it more often in the future.

@agudian

This comment has been minimized.

Show comment
Hide comment
@agudian

agudian Mar 12, 2017

Member

Just pushed @filiphr's fix for this to master... Thanks Filip, and thanks @brabenetz for reporing this 👍

Member

agudian commented Mar 12, 2017

Just pushed @filiphr's fix for this to master... Thanks Filip, and thanks @brabenetz for reporing this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment