Menu

#118 Deep property mapping and is-accesssible=true incompatible

Dozer v5.3.0
closed-fixed
None
5
2010-08-04
2007-11-02
Stanford
No

I have a JAXB generated class which has a *ListType property which has a List<> member with no setter. I attempt to map this as follows:

<field>
<a is-accessible="true">amenityCodes</a>
<b is-accessible="true">amenityList.amenties</b>
</field>

It appears that the is-accessible feature will not traverse a deep-property specification, instead failing because there is no such property "amenityList.amenities" on the destination object.

It would be nice if dozer would negotiation the chain of properties and then assume that the last nested property is the field to lookup.

Discussion

  • Lars Bergström

    Lars Bergström - 2010-06-21

    Hi, I have the same problem nearly 3 years later. Why no comments on this one? Are we doing something wrong? Is this still an issue?

    Best regards
    /Lasse Bergström

     
  • Damien de Saint Laurent

    did you find any workaround ?

     
  • Anonymous

    Anonymous - 2010-07-14

    Indeed, I also have this problem. It's really annoying when using JAXB since it doesn't allow the generation of setter for collections. I have to modify the auto-generated classes in order for Dozer to work correctly, which is painful.
    Can someone fix it once and for all, please ?
    I may look at the code but I'm not that comfortable with it so it would take time to come with a clean solution.

     
  • dmitry (lv)

    dmitry (lv) - 2010-08-04
    • milestone: --> Dozer v5.3.0
    • assigned_to: nobody --> buzdin
     
  • dmitry (lv)

    dmitry (lv) - 2010-08-04

    This was never implemented. I am currently working on resolution.

     
  • dmitry (lv)

    dmitry (lv) - 2010-08-04

    Fixed in trunk.
    Mappings, which are nested *and* indexed at the same moment are not currently supported.

     
  • dmitry (lv)

    dmitry (lv) - 2010-08-04
    • status: open --> closed-fixed
     

Log in to post a comment.