problem:
iam unsing postgresql database.
i have two tables one is class_definition with having column named class_id_pk which is primary key, and there is another table state_classes with column class_id_fk having the foreign key reference of class_id_pk. when i load session factory, it creates the extra empty column with name class_id_pk in state_classes table.in postgresql database.. i dont want this to happen adding unnecessary extra column...
is there any attribute to avoid creation of extra column?
ex: table1 : class_definition
columns: class_id_pk, class_name;
class_id_pk primary key btree (class_id_pk)
table2: state_classes
columns: state_classes_id_pk, class_id_fk
class_id_fk FOREIGN KEY (class_id_fk) REFERENCES class_definition(class_id_pk) MATCH FULL ON UPDATE NO ACTION ON DELETE CASCADE,
after running session factory, with in hibernate.cfg.xml having attribute hbmddl_auto update propery,,
it creates extra columns in state_classes, after generating hibernate generating mappings we get in postgres data base with
table2: state_classes
columns: state_classes_id_pk, class_id_fk. class_id_pk
,
is their is any option not to add extra column in postgres....
|