MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
P0rridge
Post subject: CodeGen template update for @ManyToOne - change to CascadeTy  PostPosted: Apr 29, 2012 - 05:32 PM
Registered Member
Registered Member


Joined: Jun 20, 2010
Posts: 143

For all my @ManyToOne in the domain classes I want to change all the

@ManyToOne(fetch = FetchType.LAZY)

to

@ManyToOne(fetch = FetchType.LAZY, cascade = CascaseType.ALL)

But when I search for ManyToOne and related nothing comes up - where would this line be in templates?

Thanks

PS I am a bit worried there will be a few questions like this - I hope you dont mind, but I without documentation I cant find another option
 
 View user's profile Send private message  
Reply with quote Back to top
cconway
Post subject:   PostPosted: May 02, 2012 - 11:34 PM



Joined: Apr 04, 2011
Posts: 196

The @ManyToOne is emitted from the <persistence:relationshipType select="$relationship" /> tag in the DataType.jet. Unfortunately, I see no way to change the cascade type on that tag so you'll have to use some conditional logic to have the template emit the code you want..

_________________
Cindy
MyEclipse for Spring Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits