diff --git a/templates/jpa-entity.java.mustache b/templates/jpa-entity.java.mustache index 21a47a5..4e54e43 100644 --- a/templates/jpa-entity.java.mustache +++ b/templates/jpa-entity.java.mustache @@ -44,7 +44,8 @@ public class {{name}} { {{#description}}/** {{.}} **/{{/description}}{{#isPkey}} @Id{{#id_generator}} @GeneratedValue({{#name}}generator = "{{.}}"{{/name}}){{#strategy}} - @GenericGenerator(name = "{{name}}", strategy = "{{.}}"){{/strategy}}{{/id_generator}}{{/isPkey}}{{#type.isCollection}} + @GenericGenerator(name = "{{name}}", strategy = "{{.}}"){{/strategy}} + {{#type}}@Type(type = "{{.}}"){{/type}}{{/id_generator}}{{/isPkey}}{{#type.isCollection}} @OneToMany{{/type.isCollection}} @Column( nullable = {{nullable}},