wood burning stoves*
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 Android Security Essentials Live Lessons this week in the Android 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
 
 
subject: autogenerating db-schema cascade=CascadeType.REMOVE but no ON DELETE CASCADE
 
Similar Threads
Simple But Crazy Cascade Problem
Column index not populated?
ManyToOne relation with composite keys
EJB - Everything works except persist()
How toPersist Value in the Tables Using Entity Bean