#186 Support for collection without setters

Dozer v5.2
closed
5
2010-01-03
2009-06-25
No

Dozer does not map to collection that don't have setters.
The attached test does not work, because there is no setter for the collection in A class.

In fact, a setter is not mandatory for collection, because the getList().add(....) is sufficient.
Supporting this will allow direct support of JAXB2.1 generated beans, because the collections by default don't have setters.

PS: If you uncomment the setter methods, test is working.

Regards,

GC.

Discussion

  • Gérard COLLIN

    Gérard COLLIN - 2009-06-25

    Sample Test

     
  • dmitry (lv)

    dmitry (lv) - 2009-06-30

    Hi, I think you forgot to upload dozer-test-mappings.xml referenced from test case.

     
  • dmitry (lv)

    dmitry (lv) - 2009-06-30
    • assigned_to: nobody --> buzdin
     
  • Gérard COLLIN

    Gérard COLLIN - 2009-08-12

    Alas, I'm sorry I didn't see your request.
    I'm afraid I'm working in a different place now so I don't have the file anymore.

     
  • Gérard COLLIN

    Gérard COLLIN - 2009-08-12

    There were nothing particuliar in the mapping file: Just automatically convert A to B

     
  • gonzalad

    gonzalad - 2009-09-24

    This patch should correct this issue.
    Includes some unit tests.

     
  • gonzalad

    gonzalad - 2009-09-24

    Excellent !!!! How can I upload a patch in this issue tracker ?

     
  • dmitry (lv)

    dmitry (lv) - 2010-01-03

    Checked behavior in trunk and it is working properly.
    The only drawback is that it prints WARN log message about missing write method each time.
    Added unit test and will add additional documentation.

     
  • dmitry (lv)

    dmitry (lv) - 2010-01-03
    • milestone: 899005 --> Dozer v5.2
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks