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

Mapping nested property to simple property does not work when used with context #1124

Closed
44past4 opened this Issue Mar 6, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@44past4

44past4 commented Mar 6, 2017

In 1.2.0-Beta1 when I am passing a context to a mapper using @context annotation and I am applying a custom mapping from nested property like "entity.id" to "entityId" property (@mapping(source = "entity.id", target = "id")) generated code does not compile as the invocation of method which extracts "entity.id" value expects context to be passed but it does not get any.

TestMapper.java.txt
TestMapperImpl.java.txt

@agudian

This comment has been minimized.

Show comment
Hide comment
@agudian

agudian Mar 6, 2017

Member

Thanks for reporting, I'll look into it... 👍

Member

agudian commented Mar 6, 2017

Thanks for reporting, I'll look into it... 👍

@agudian agudian added this to the 1.2-next milestone Mar 6, 2017

@agudian agudian self-assigned this Mar 6, 2017

agudian added a commit to agudian/mapstruct that referenced this issue Mar 6, 2017

#1124 Don't pass context parameters to forged methods for nested prop…
…erty mapping methods.

NestedPropertyMappingMethod currently can't handle lifecycle methods anyway, so we can skip adding the context parameters.

@agudian agudian added the bug label Mar 8, 2017

@agudian agudian closed this in #1125 Mar 12, 2017

agudian added a commit that referenced this issue Mar 12, 2017

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