Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2009-04-13 10:39:26 -0400
committerkmoore2009-04-13 10:39:26 -0400
commit21bd5b403e7acf6bbf41e76d5ca44adb825594bc (patch)
tree9e8f8240ef13d441419a9b81f67468a74fc9fe40
parentf77bcae037fe9414595ec76e535e6c05627a16b8 (diff)
downloadwebtools.dali-21bd5b403e7acf6bbf41e76d5ca44adb825594bc.tar.gz
webtools.dali-21bd5b403e7acf6bbf41e76d5ca44adb825594bc.tar.xz
webtools.dali-21bd5b403e7acf6bbf41e76d5ca44adb825594bc.zip
268438 - patch from danny ju - Entity Generation - Embeddable, Version, ManyToMany generated with ()
-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