From 4aec3636b1fad578df13f3e3cfad66d6157b4d14 Mon Sep 17 00:00:00 2001 From: Niclas Thobaben Date: Sun, 19 Sep 2021 22:53:16 +0200 Subject: [PATCH] added many to one consraint --- templates/jpa-entity.java.mustache | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/jpa-entity.java.mustache b/templates/jpa-entity.java.mustache index 9ed7f8f..7bf5918 100644 --- a/templates/jpa-entity.java.mustache +++ b/templates/jpa-entity.java.mustache @@ -57,7 +57,8 @@ public class {{name}} { @UpdateTimestamp{{/updateTimestamp}}{{#creationTimestamp}} @CreationTimestamp{{/creationTimestamp}}{{#oneToMany}} @OneToMany{{/oneToMany}}{{#oneToOne}} - @OneToOne{{/oneToOne}} + @OneToOne{{/oneToOne}}{{#isRecord}}{{^isCollection}} + @ManyToOne{{/isCollection}}{{/isRecord}} private {{{type.name}}} {{name}}; {{/fields}}