aspose file tools*
The moose likes Object Relational Mapping and the fly likes autogenerating db-schema cascade=CascadeType.REMOVE but no ON DELETE CASCADE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "autogenerating db-schema cascade=CascadeType.REMOVE but no ON DELETE CASCADE" Watch "autogenerating db-schema cascade=CascadeType.REMOVE but no ON DELETE CASCADE" New topic
Author

autogenerating db-schema cascade=CascadeType.REMOVE but no ON DELETE CASCADE

rouven gorsky
Greenhorn

Joined: Feb 10, 2009
Posts: 14
Good day/night

One question about auto-generating DB-schemas:

I have defined the following two Entities:



and



They run in a JBoss application server jboss-4.2.2.GA. I have set some Hibernate-Properties in order to autgenerate the tables on deployment. It all works fine but something puzzles me: These are the two auto generated create queries for the tables:





Why is there no [b]ON DELETE CASCADE[/b] statement in the child-query?? There should be one as I have declared @OneToMany(cascade=CascadeType.REMOVE, mappedBy="parent") in the parent-entity.
Thank you for your assistance.

Gorsky
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: autogenerating db-schema cascade=CascadeType.REMOVE but no ON DELETE CASCADE