Search code examples
javadozer

Dozer mapping Booleans


I am using dozer and I can't map from boolean to Boolean. What could be the problem?

mapping xhtml

<field>
    <a>test</a>
    <b is-accessible="true" >test2</b>
</field>

class a

private boolean test;

public boolean getTest(){
    return test;
}

class b

private Boolean test2;

public boolean isTest2(){
    return test2;
}

Solution

  • With dozer 5.4.0, the following worked for me

        <field>
            <a is-accessible="true" get-method="isFoo">foo</a>
            <b is-accessible="true" set-method="setFoo">foo</b>
        </field>