A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jan 23, 2006
Jul 24, 2006 11:38:00
How to use foreign keys as they establish relation between parent and child table and also if any updation or deletion is done in parent table the child table is also done with the changes?
Please tell the query...
Thanks advance who ever answers this question.
Joined: Oct 23, 2005
Jul 24, 2006 13:51:00
I believe what you are interested in is 'cascading deletes'. When you create the table reference you add the keywords "ON DELETE CASCADE" without the quotes.
The syntax may very from db to db so you might have to check google for except specifications.
Down Home Country Coding with Scott Selikoff
I agree. Here's the link:
i have a Errors in Hibernate Query
How does Hibernate get child objects
Updation of child table.
Can't remove (delete) rows in one to many relationship
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014