polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Merlin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZEST-22) Add toValue() and toEntity() methods to the Qi4j API.
Date Thu, 09 Jul 2015 14:58:05 GMT

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

Paul Merlin updated ZEST-22:
----------------------------
    Fix Version/s: 2.1

> Add toValue() and toEntity() methods to the Qi4j API.
> -----------------------------------------------------
>
>                 Key: ZEST-22
>                 URL: https://issues.apache.org/jira/browse/ZEST-22
>             Project: Zest
>          Issue Type: Bug
>            Reporter: Niclas Hedhman
>            Assignee: Niclas Hedhman
>             Fix For: 2.1
>
>
> Rickard added the support for handling Associations in Values, and we also now have the
full support of sharing super-types between Entities and Values.
> So, it would make sense that if I declare the assembly;
>     module.entities( Person.class );
>     module.values( Person.class );
> that I could do;
>     Person entity = ...;
>     Person value = api.toValue( Person,class, entity );
> as well as the other way around;
>     Person value = ...;
>     Person entity = api.toEntity( Person.class, entity );
> The implementation of this is fairly small and straight forward, and I have most of it
in place in my project already, but I think it really belongs in the API itself, as this would
be super-neat for Rest APIs and other work outside of UnitOfWorks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message