You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "David Leangen (JIRA)" <ji...@apache.org> on 2017/02/22 12:52:44 UTC

[jira] [Resolved] (FELIX-5561) Support for merging?

     [ https://issues.apache.org/jira/browse/FELIX-5561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Leangen resolved FELIX-5561.
----------------------------------
    Resolution: Won't Fix

> 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)