| Author |
Updating Multiple table using Hibernate
|
Kunal Lakhani
Ranch Hand
Joined: Jun 05, 2010
Posts: 609
|
|
I have a requirement where i need to update 6 tables. Each table contains a status column. I need to update the status column of those rows where id = 1.
So, should i go for manually fetching all rows from each table and update it in a single class? or is there any other easy and suitable way to update the tables?
|
kunal
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
|
It doesn't sound like there is a relationship between the tables other than having a status column (which is not really a relationship). I would address each one independently rather than trying to tie things together where there is no relationship.
|
[How To Ask Questions][Read before you PM me]
|
 |
Kunal Lakhani
Ranch Hand
Joined: Jun 05, 2010
Posts: 609
|
|
|
Thanks for your reply Bill Gorder. There is no relationship between the tables. So, according to you, i need to fetch records from each table and update it's status column? Right?
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
|
From what I understand, that is what I would do.
|
 |
Kunal Lakhani
Ranch Hand
Joined: Jun 05, 2010
Posts: 609
|
|
|
Thanks Bill Gorder for your reply
|
 |
 |
|
|
subject: Updating Multiple table using Hibernate
|
|
|