• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update column in child table on Updating some column in parent table

 
RamandeepS Singh
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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
 
K. Tsang
Bartender
Posts: 3521
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic