Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jpa/plugins/org.eclipse.jpt.gen/templates/entities/manyToMany.vm8
-rw-r--r--jpa/plugins/org.eclipse.jpt.gen/templates/entities/mappingKind.vm4
2 files changed, 10 insertions, 2 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.gen/templates/entities/manyToMany.vm b/jpa/plugins/org.eclipse.jpt.gen/templates/entities/manyToMany.vm
index affed63021..e482aa31c3 100644
--- a/jpa/plugins/org.eclipse.jpt.gen/templates/entities/manyToMany.vm
+++ b/jpa/plugins/org.eclipse.jpt.gen/templates/entities/manyToMany.vm
@@ -7,12 +7,20 @@
#if($customizer.genFetch($role.referrerTable)!="" && $customizer.genFetch($role.referrerTable)!="FetchType.LAZY")
#set ($members = $customizer.appendAnnotation($members, "fetch", $customizer.genFetch($role.referrerTable), false))
#end
+#if($members!="")
@ManyToMany($members)
+#else
+ @ManyToMany
+#end
#else
#set ($members = $customizer.appendAnnotation("", "cascade", $customizer.genCascades($role), false))
#if($customizer.genFetch($role.referrerTable)!="" && $customizer.genFetch($role.referrerTable)!="FetchType.LAZY")
#set ($members = $customizer.appendAnnotation($members, "fetch", $customizer.genFetch($role.referrerTable), false))
#end
+#if($members!="")
@ManyToMany($members)
+#else
+ @ManyToMany
+#end
#parse("join.vm")
#end \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.gen/templates/entities/mappingKind.vm b/jpa/plugins/org.eclipse.jpt.gen/templates/entities/mappingKind.vm
index f378cb24d6..80ad057233 100644
--- a/jpa/plugins/org.eclipse.jpt.gen/templates/entities/mappingKind.vm
+++ b/jpa/plugins/org.eclipse.jpt.gen/templates/entities/mappingKind.vm
@@ -28,7 +28,7 @@
@GeneratedValue(strategy=$generationType)
#end
#elseif ($mappingKind == "version")
- @Version()
+ @Version
#else
-##DEFAULT is @Basic(), no need to generate
+##DEFAULT is @Basic, no need to generate
#end \ No newline at end of file

Back to the top