Antonio Goncalves created FORGE-2098:
----------------------------------------
Summary: 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
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.1#6329)