[ 
https://issues.apache.org/jira/browse/FELIX-5561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15877939#comment-15877939
 ] 

David Bosschaert commented on FELIX-5561:
-----------------------------------------

I think this should be considered out of scope. With merging comes conflict 
resolution and conflict resolution is domain-specific and often requires manual 
intervention. I think that the converter as-is can help preparing objects for a 
merge by converting them to the same type, but the actual merge should be done 
with another tool IMHO.

> Support for merging?
> --------------------
>
>                 Key: FELIX-5561
>                 URL: https://issues.apache.org/jira/browse/FELIX-5561
>             Project: Felix
>          Issue Type: Wish
>          Components: Converter
>            Reporter: David Leangen
>
> Would it be reasonable for the Converter to support a "merge" operation? Or 
> is that just too far out of scope.
> Example - merging a partial map into an existing object:
> Object o2 = converter.merge( m ).into( o1 ).
> Example of "complex" chaining operation - merging two maps, and converting to 
> object:
> Object o2 = converter.merge( m1 ).into( m2 ).to( Object.class );
> Just thinking hypothetically for now.
> I can imagine cases where partial updates need to be applied. For instance, 
> if a "Contact" object exists, and we only want to update one or two fields, 
> the Converter could assist:
> Contact updated = converter.merge( "{name:'Joe Smith', nickname:'joey'} 
> ).into( contact );
> If this is too far out of scope, I'll drop it here. Otherwise, I'll play 
> around with it a bit and let you know how that goes.
> wdyt?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to