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

Mapping Maps with custom mapping configuration leads to empty result objects #180

Closed
maybeec opened this issue Jul 28, 2014 · 0 comments · Fixed by #181
Closed

Mapping Maps with custom mapping configuration leads to empty result objects #180

maybeec opened this issue Jul 28, 2014 · 0 comments · Fixed by #181

Comments

@maybeec
Copy link
Contributor

maybeec commented Jul 28, 2014

I have configured the following Custom Mapping to map
Map<Long, CustomObj1> to Map<Long, CustomObj2>
as property of a custom object:

<mapping>
    <class-a>objectA</class-a>
    <class-b>objectB</class-b>

    <field>
        <a>mapField</a>
        <b>mapField</b>
        <a-hint>CustomObj1</a-hint>
        <b-hint>CustomObj2</b-hint>
    </field>
</mapping>

Interestingly I get the result CustomObj2 object with all properties filled with null. I debuged into the code and observed a bug, I will fix soon and provide a pull request. In this special case, a new instance of the target b-hint will be created and mapped, but the mapped object reference get lost in the code.

maybeec added a commit to maybeec/dozer that referenced this issue Jul 28, 2014
maybeec added a commit to maybeec/dozer that referenced this issue Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant