[forge-issues] [JBoss JIRA] (FORGE-398) PersistencePlugin does not generate Cascade
Richard Kennard (JIRA)
jira-events at lists.jboss.org
Thu Jan 26 18:06:48 EST 2012
[ https://issues.jboss.org/browse/FORGE-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662325#comment-12662325 ]
Richard Kennard commented on FORGE-398:
---------------------------------------
Yes. If it says @OneToMany, and it says mappedBy, then it needs to say CascadeType.ALL.
@OneToOne is fine as is. @OneToMany without mappedBy is fine as is too. @ManyToMany and @ManyToOne are fine as is.
> PersistencePlugin does not generate Cascade
> -------------------------------------------
>
> Key: FORGE-398
> URL: https://issues.jboss.org/browse/FORGE-398
> Project: Forge
> Issue Type: Feature Request
> Reporter: Richard Kennard
> Assignee: Lincoln Baxter III
> Fix For: 1.0.0.Beta4
>
>
> This is one of those 'we could do it a different way, but it would make the generated code cleaner if...' requests :)
> At present the PersistencePlugin generates:
> @OneToOne
> private Profile profile;
> public Profile getProfile() {
> return this.profile;
> }
> public void setProfile(final Profile profile) {
> this.profile = profile;
> }
> I would instead like it to generate:
> @OneToOne(cascade = CascadeType.ALL)
> private Profile profile;
> public Profile getProfile() {
> return this.profile;
> }
> public void setProfile(final Profile profile) {
> this.profile = profile;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the forge-issues
mailing list