File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Update column in child table on Updating some column in parent table
Joined: Aug 25, 2009
Nov 19, 2013 23:30:29
I have one table user and child table user_details and in both tables I have column named as status.
I want that whenever I update the status column in user table it also get updated in user_details table
I am using hibernate
Thanks Ramandeep S
Joined: Sep 13, 2007
Nov 20, 2013 08:38:21
Don't know how you set up your hibernate. But in plain sql terms assuming there is a foreign key linking parent table to child table then you will issue 2 update statements.
Don't get me started about those stupid
subject: Update column in child table on Updating some column in parent table
update query wont work in mysql, column name to blame?
SQL Query for this?
Foreign key table inserting duplicate on update
Updating Multiple table using Hibernate
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014