One way mapping doesn't work when used at the mapping level:
When mapping APrime to A, the fields in APrime are still copied to A!
Could you try to add empty mapping from APrime to A with wildcard=false specified. I have a feeling that even if you choose one-way, but you are having wildcard option, then it is one-way only for explicit mappings, not implicit.
I tried the following and it didn't work:
<mapping type="one-way" wildcard="false">
Hi, you should also set wildcard=false.
Dozer works in implicit and explicit mapping modes. You are telling in your mapping that you want explicit one-way and implicit other way around. What you need in addition is to disable implicit mappings via wildcard attribute
Didn't you read my previous comment? I have already tried that!
sorry for the deja-vu effect :)
Missed your and mine comments altogether.
Having looked at the test you sent came to conclusion that this is still not a bug.
One important point is wildcard setting in configuration block. In your case it is "true". To make test pass you should add one more reverse one-way mapping with wildcard=false.
Another option is to set configuration level wildcard to false and then Dozer will not try to perform mappings automatically, but only via explicit field mappings.
<mapping wildcard=false type=one-way>
I am closing the issue ticket.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.