Thursday, 8 August 2013

Hibernate updating primary key

Hibernate updating primary key

is it possibile to update a primary key that having more than one table
mapping? How can i update id in Master table?
CREATE TABLE Master (id INT, name VARCHAR(20),address VARCHAR(20),Primary
key(id));
CREATE TABLE Slave_1 (id INT,s1_id INT,area VARCHAR(20),project
VARCHAR(20),primary key(s1_id),Foreign Key (id) references Master(id));
CREATE TABLE Slave_2 (id INT,s2_id INT,area VARCHAR(20),project
VARCHAR(20),primary key(s2_id),Foreign Key (id) references Master(id));

No comments:

Post a Comment