java - Hibernate updating primary key -
is possible update primary key
having more 1 table mapping? how can 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));
you follows:
disable foreign key constraints.
update id/references
enable foreign key constraints.
Comments
Post a Comment