You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/05/26 13:04:22 UTC
[jira] [Commented] (CAMEL-5031) Dozer Type Conversion Does Not Work
With Context Based Mappings (map-id)
[ https://issues.apache.org/jira/browse/CAMEL-5031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13667284#comment-13667284 ]
Claus Ibsen commented on CAMEL-5031:
------------------------------------
Any update on this?
> Dozer Type Conversion Does Not Work With Context Based Mappings (map-id)
> ------------------------------------------------------------------------
>
> Key: CAMEL-5031
> URL: https://issues.apache.org/jira/browse/CAMEL-5031
> Project: Camel
> Issue Type: Improvement
> Components: bean-integration, camel-core
> Affects Versions: 2.6.0, 2.9.0
> Reporter: Andre Piwoni
> Priority: Minor
>
> DozerTypeConverter utilizes DozerBeanMappper's method map(Object source, Class<T> destinationClass) to convert objects. Unfortunately, this does not work for Dozer's context based mapping with map-id because it requires call to DozerBeanMappper.map(Object source, Class<T> destinationClass, String mapId).
> Example below does not work without map-id, which is actually required for this type of mapping (see http://dozer.sourceforge.net/documentation/faq.html#complex-to-map)
> <mapping map-id="myMapping">
> <class-a>x.y.z.ComplexType</class-a>
> <class-b>java.util.Map</class-b>
> <field copy-by-reference="true">
> <a>complexTypeField</a>
> <b key="complexTypeFieldKeyName">this</b>
> </field>
> ...
> </mapping>
> DozerTypeConverterLoader has access to ClassMap and its map-id, if any, in order to construct a lookup for map-id for a given conversion pair. This is tricky, however, since there can be multiple mappings with different ids for the same conversion pair.
> Interfaces for Dozer and Camel Conversion may not be fully compatible but it would be great if at least limitations can be stated in documentation.
> Regards,
> Andre Piwoni
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira