Hi everybody,
I am using Hibernate synchronizer to do my final studies' project, but i'am facing a problem
I explain : I have a database composed of tables having (inheritance and composition) in some cases.. I've done the .hbm.xml mapping correctly.. but when i make a query on those tables from my java code (Eclipse), I realise that new Foreign Keys have been created in my table, even if I make (select queries) which make impossible for me to do further treatments on my table..
Before :
Code:
CREATE TABLE `feature` (
`ID_ART` bigint(20) NOT NULL,
`FEA_ID_ART` bigint(20) default NULL,
`ID_PROD` bigint(20) default NULL,
`NOM_ART` varchar(20) default NULL,
`VER_ART` longtext,
`STATUT_ART` longtext,
`DESCRIPTION_ART` text,
`PRIORITE_FEAT` varchar(10) default NULL,
`DETAILS_FEAT` text,
PRIMARY KEY (`ID_ART`),
KEY `COMPOSE_FEAT_FK` (`FEA_ID_ART`),
CONSTRAINT `FK_COMPOSE_FEAT` FOREIGN KEY (`FEA_ID_ART`) REFERENCES `feature` (`ID_ART`),
CONSTRAINT `FK_HERITAGE_1` FOREIGN KEY (`ID_ART`) REFERENCES `artifact` (`ID_ART`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
After :
Code:
CREATE TABLE `feature` (
`ID_ART` bigint(20) NOT NULL,
`FEA_ID_ART` bigint(20) default NULL,
`ID_PROD` bigint(20) default NULL,
`NOM_ART` varchar(20) default NULL,
`VER_ART` longtext,
`STATUT_ART` longtext,
`DESCRIPTION_ART` text,
`PRIORITE_FEAT` varchar(10) default NULL,
`DETAILS_FEAT` text,
PRIMARY KEY (`ID_ART`),
KEY `COMPOSE_FEAT_FK` (`FEA_ID_ART`),
KEY `FKC5A27AF69E837999` (`ID_ART`),
KEY `FKC5A27AF65060162D` (`ID_ART`),
KEY `FKC5A27AF6708854F6` (`FEA_ID_ART`),
CONSTRAINT `FKC5A27AF6708854F6` FOREIGN KEY (`FEA_ID_ART`) REFERENCES `feature` (`ID_ART`),
CONSTRAINT `FKC5A27AF65060162D` FOREIGN KEY (`ID_ART`) REFERENCES `artifact` (`ID_ART`),
CONSTRAINT `FKC5A27AF69E837999` FOREIGN KEY (`ID_ART`) REFERENCES `feature` (`ID_ART`),
CONSTRAINT `FK_COMPOSE_FEAT` FOREIGN KEY (`FEA_ID_ART`) REFERENCES `feature` (`ID_ART`),
CONSTRAINT `FK_HERITAGE_1` FOREIGN KEY (`ID_ART`) REFERENCES `artifact` (`ID_ART`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
As you can see, new FK are created (with the numbers) in my table, it makes me unable to make other queries (especially inserting)..
Im a working with Hibernate Synchronizer and a MySQL 5.0 database
I'm sorry for my weak English..
Thanks in advance for your help