Skip to main content
summaryrefslogtreecommitdiffstats
blob: 46f15cbec9a3521062e77f0d761d6ce491ff104f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
##included template. Generates the @OneToMany annotation.
##Assumes that the context has a "role" object representing the generated AssociationRole
##
#if ($role.association.bidirectional)
#set ($members = $customizer.appendAnnotation("", "mappedBy", $role.oppositeRole.propertyName, true))
#set ($members = $customizer.appendAnnotation($members, "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
	@OneToMany($members)
#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
	@OneToMany($members)
#parse("join.vm")
#end

Back to the top