-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: @OnDelete(action=OnDeleteAction.CASCADE)
PostPosted: Mon Jul 16, 2007 7:55 pm 
Newbie

Joined: Sun Apr 09, 2006 4:57 pm
Posts: 10
Location: Milan (Italy)
Hibernate version: 3.2 - Annotattions 3.3.0.GA
Postgres 8.2

Reading the documentation, an annotation like this one
Code:
@ManyToOne
@OnDelete(action=OnDeleteAction.CASCADE)
@JoinColumn(name="party")
@ForeignKey(name="FK_Party")


should let the schema export (hbm2ddl.auto=create-drop) produce a foreign key named fk_party with the "on delete action" setted to cascade.

Unfortunatly it does not happen on a Postgres 8.2. The foreign key is corrected created and named, but the "on delete action" remains setted to No action.

Where am i wrong?

Thanks a lot

_________________
Marco Pancotti


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.