Hibernate: drop table Laptop if exists
Hibernate: drop table laptop_components if exists
Hibernate: create table Component (id varchar(255) not null, name varchar(255), laptop_id varchar(255), primary key (id))
Hibernate: create table Laptop (id varchar(255) not null, brand varchar(255), series varchar(255), primary key (id))
Hibernate: create table laptop_components (
laptop_id varchar(255) not null,
component_id varchar(255) not null,
primary key (laptop_id, component_id)
)
Hibernate: alter table laptop_components add constraint UK_1n0yp9k01q1uf7nf5kadq4o2s unique (component_id)
Hibernate: alter table Component add constraint FKih2f07tb259k4o5j7oi6x0yy8 foreign key (laptop_id) references Laptop
Hibernate: alter table laptop_components add constraint FKsyr0k6qm7di0dijd7hlvjtcj9 foreign key (component_id) references Component
Hibernate: alter table laptop_components add constraint FKm3j842ax28v8q7l805un43qbj foreign key (laptop_id) references Laptop
Hibernate: insert into Laptop (brand, series, id) values (?, ?, ?)
Hibernate: insert into Component (laptop_id, name, id) values (?, ?, ?)
Hibernate: insert into laptop_components (laptop_id, component_id) values (?, ?)