Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
rouven gorsky
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic