[jboss-jira] [JBoss JIRA] Created: (HIBERNATE-74) Add support for ON DELETE RESTRICT | CASCADE | SET TO NULL for Java entity generation
sstrenn (JIRA)
jira-events at lists.jboss.org
Thu Nov 15 03:39:18 EST 2007
Add support for ON DELETE RESTRICT | CASCADE | SET TO NULL for Java entity generation
-------------------------------------------------------------------------------------
Key: HIBERNATE-74
URL: http://jira.jboss.com/jira/browse/HIBERNATE-74
Project: Hibernate
Issue Type: Feature Request
Reporter: sstrenn
Assigned To: Steve Ebersole
It appears that the Java entities that correspond to tables with foreign keys in them always result in a @OneToMany annotation with a cascade type of ALL, even when the foreign key has a constraint of ON DELETE RESTRICT. This can cause confusion for developers, since, in most other aspects, the Java entities mirror the database behavior.
So this request is to add support for ON DELETE RESTRICT | CASCADE | SET TO NULL for Java entity generation. As an example of the cascade type for a foreign key that has a ON DELETE RESTRICT constraint, perhaps the annotation would be: @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, ...)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list