facebook

CodeGen template update for @ManyToOne – change to CascadeTy

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #325635 Reply

    Greg Soulsby
    Member

    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

    #325759 Reply

    cconway
    Member

    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..

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: CodeGen template update for @ManyToOne – change to CascadeTy

You must be logged in to post in the forum log in