[forge-issues] [JBoss JIRA] (FORGE-2098) Being able to create a new JPA converter
Antonio Goncalves (JIRA)
issues at jboss.org
Sat Jun 13 13:20:02 EDT 2015
[ https://issues.jboss.org/browse/FORGE-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Goncalves reassigned FORGE-2098:
----------------------------------------
Assignee: Antonio Goncalves
> Being able to create a new JPA converter
> ----------------------------------------
>
> Key: FORGE-2098
> URL: https://issues.jboss.org/browse/FORGE-2098
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.12.1.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> It would be good to be able to create a new JPA converter with just the following command :
> {code}
> jpa-new-converter --name CreditCardConverter --fromAttribute CreditCard --toColumn String
> {code}
> This will generate the following code :
> {code}
> @Converter(autoApply = true)
> public class CreditCardConverter implements AttributeConverter<CreditCard, String> {
> @Override
> public String convertToDatabaseColumn(CreditCard entityAttribute) {
> return null;
> }
> @Override
> public CreditCard convertToEntityAttribute(String databaseColumn) {
> return null;
> }
> }
> {code}
> (!) This command is only available in JPA 2.1
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the forge-issues
mailing list