-
-
Notifications
You must be signed in to change notification settings - Fork 1k
add ignored annotation issues #1958 #3788
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
Conversation
|
Would be nice if this would also support ignoring properties based on a prefix, like mentioned in this comment related to generated 'withXX' methods. |
|
I'll try to see it on the weekend. |
|
@diversit i'm add prefix for Ignored annotation for this case |
|
Awesome! |
@diversit we do not want to support pattern ignores. We've said this few times already. @xumk your idea with the prefix is OK I think, it basically transforms |
|
@filiphr |
filiphr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @xumk, sorry that it take some time, but I've been a bit busy.
I've left some comments.
Something additional. I'd like to have some tests for the following options:
@Mapping(target = "name", ignore = true)
@Ignored(targets = "name")and
@Mapping(target = "name", source = "firstName")
@Ignored(targets = "name")What is happening in those scenarios
...sor/src/test/java/org/mapstruct/ap/test/ignored/ErroneousTargetHasNoWriteAccessorMapper.java
Outdated
Show resolved
Hide resolved
6d80e09 to
0f8780e
Compare
|
@filiphr thanks. i fixed remarks and checked you case it test ok. property is ignored. it not ignored property. name have value firstName. Is it good? i added two test |
|
Thanks for checking that @xumk. My main point was the fact that a combination of |
|
@filiphr ok, I will try to do it soon. |
|
@filiphr I added a check |
filiphr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some polishing this LGTM. Thanks @xumk
add new annotation for ignored more than one property
Fixes #1958