Hi,
I want to write data into different tables for the same class using hibernate 4 annotations. For instance, I've a class Diagram. Now I want to create 3 tables using the sane class Diagram where primary key of one table is foreign key in the other table.
create table DIAGRAM(
diag_id INT NOT NULL auto_increment,
name VARCHAR(20) default NULL,
description VARCHAR(20) default NULL,
PRIMARY KEY (diag_id));
create table ELEMENT(
elem_id INT NOT NULL auto_increment,
diag_id INT NOT NULL,
style VARCHAR(20) default NULL,
PRIMARY KEY (elem_id));
create table GEOMETRY(
geom_id INT NOT NULL auto_increment,
elem_id INT NOT NULL,
xcoordinate VARCHAR(20) default NULL,
ycoordinate VARCHAR(20) default NULL,
PRIMARY KEY (geom_id));
Good content - but what a bad layout! You display lines of code which do not fit on one line. And to scroll to the left or right you first have to scroll down to the end of the page where the scroll bar is located. This ist one of the worst things to do in web page design
Hibernate4Mahesh V.Shet September 29, 2012 at 7:58 PM
Cool One.....Happy this post helped me learn tip of Hibernate Iceberg....!!! Thanks.
Create multiple tablesNeha February 7, 2012 at 6:27 PM
Hi, I want to write data into different tables for the same class using hibernate 4 annotations. For instance, I've a class Diagram. Now I want to create 3 tables using the sane class Diagram where primary key of one table is foreign key in the other table. create table DIAGRAM( diag_id INT NOT NULL auto_increment, name VARCHAR(20) default NULL, description VARCHAR(20) default NULL, PRIMARY KEY (diag_id)); create table ELEMENT( elem_id INT NOT NULL auto_increment, diag_id INT NOT NULL, style VARCHAR(20) default NULL, PRIMARY KEY (elem_id)); create table GEOMETRY( geom_id INT NOT NULL auto_increment, elem_id INT NOT NULL, xcoordinate VARCHAR(20) default NULL, ycoordinate VARCHAR(20) default NULL, PRIMARY KEY (geom_id));
Bad LayoutHelmut Faasch April 15, 2012 at 1:28 PM
Good content - but what a bad layout! You display lines of code which do not fit on one line. And to scroll to the left or right you first have to scroll down to the end of the page where the scroll bar is located. This ist one of the worst things to do in web page design
Hibernate4Mahesh V.Shet September 29, 2012 at 7:58 PM
Cool One.....Happy this post helped me learn tip of Hibernate Iceberg....!!! Thanks.
Post your Comment