added jpa entity generator

master
Niclas Thobaben 2021-09-18 19:02:41 +02:00
parent cc2934b0d5
commit d7ac4fa5db
2 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,7 @@ module.exports = {
field.columnType = field_attr.type || ''
field.oneToMany = field_attr.constraint == 'oneToMany'
field.oneToOne = field_attr.constraint == 'oneToOne'
return field

View File

@ -55,7 +55,8 @@ public class {{name}} {
@Enumerated(EnumType.STRING){{/isEnum}}{{#updateTimestamp}}
@UpdateTimestamp{{/updateTimestamp}}{{#creationTimestamp}}
@CreationTimestamp{{/creationTimestamp}}{{#oneToMany}}
@OneToMany{{/oneToMany}}
@OneToMany{{/oneToMany}}{{#oneToOne}}
@OneToOne{{/oneToOne}}
private {{{type.name}}} {{name}};
{{/fields}}