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/04/10 01:22:41 UTC
[jira] [Comment Edited] (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=15962338#comment-15962338 ]
Niclas Hedhman edited comment on POLYGENE-54 at 4/10/17 1:21 AM:
-----------------------------------------------------------------
Looking into the details, and this is less than ideal, as builders are not used all the time.
But in both cases there are 4 functions to express the state in values or entities. Perhaps we should instead make those functions part of a ToValueConverter and ToEntityConverter types that are registered as metaInfo. If the metaInfo is not present, the default is used. This feels like a 'better' option that expanding the number of methods in UnitOfWork.
Or perhaps the metaInfo for this should be on the UnitOfWork??
was (Author: niclas):
Looking into the details, and this is less than ideal, as builders are not used all the time.
But in both cases there are 4 functions to express the state in values or entities. Perhaps we should instead make those functions part of a ToValueConverter and ToEntityConverter types that are registered as metaInfo. If the metaInfo is not present, the default is used. This feels like a 'better' option that expanding the number of methods in UnitOfWork.
> 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
> Assignee: Niclas Hedhman
> 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)