Hi edikus,

I think while creating the FK constraint you can specify 3 categories like
a) ON DELETE NO ACTION
b) ON DELETE CASCADE
c) ON DELETE RESTRICT.
Defualt is : ON DELETE NO ACTION. So in that case it will remove the ONE and set the 
fk to null in MANY. 
In your case you can set that to ON DELETE RESTRICT.
Ex: ALTER TABLE MYTABLE ADD CONSTRAINT FK_MANY_ONE FOREIGN KEY (ONE_FK) REFERENCES ONE 
(ID) ON UPDATE NO ACTION ON DELETE RESTRICT.

Murali.


<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3826932#3826932";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3826932>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to