推土机映射类A - > B级

时间:2015-06-30 10:40:17

标签: dozer

我对通过Dozer映射映射2个对象感到困惑。因此,一个类A具有typeCode,另一个类B具有typeCode(相同的拼写)和isCashFund 我为typeCode =>编写了自定义转换器isCashfund但它现在不会填充B类的typeCode,因为它现在不是一对一的映射。

<mapping>
<class-a>TsmfFund</class-a>
<class-b>Fund</class-b>
<field type="one-way">
<a>priceTypeSet.description</a>
<b>priceTypeSetDescription</b>
</field>
<field>
<a>currencyCode</a>
<b>currency</b>
</field>
<field type="one-way" custom-converter="FundTypeConverter">
        <a>typeCode</a>
        <b>cashFund</b>
    </field>
</mapping>

0 个答案:

没有答案
相关问题