You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by "Niclas Hedhman (JIRA)" <ji...@apache.org> on 2017/02/18 02:31:44 UTC

[jira] [Commented] (POLYGENE-54) Support more use-cases in toEntity/toValue mechanism

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

Niclas Hedhman commented on POLYGENE-54:
----------------------------------------

I suggest that an optional BiFunction closure is provided in the toEntity/toValue methods, passing in the Builder of the output and the input entity/value.

That would give a great deal of flexibility with minimal impact on the feature itself.

> Support more use-cases in toEntity/toValue mechanism
> ----------------------------------------------------
>
>                 Key: POLYGENE-54
>                 URL: https://issues.apache.org/jira/browse/POLYGENE-54
>             Project: Polygene
>          Issue Type: Bug
>            Reporter: Paul Merlin
>              Labels: unitofwork
>             Fix For: 3.0
>
>
> See discussion at http://markmail.org/message/yqzezcovwieu6ev3
> Now deprecated Conversion Library has support for type-relaxed conversion plus a way to insert custom conversion code. New toEntity/toValue support in UnitOfWork don't.
> Some use-cases:
> - don't expose the whole state (eg. password hashes)
> - computed/transformed state (eg. entity state ~ value state)
> This issue is about finding additional solutions to support theses usecases in the toEntity/toValue mechanism.



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