I have two tables TableA and TableB where TableA has columns col1, col2, col3, col4, col5 and col1, col2 and col3 combine to form its primary key. TableA and TableB has one-to-many relationship on the same column(col1, col2 and col3) as its foreign key constraint. Now how can I update just col2 values in both TableA and TableB in SQL and in Hibernate?