Hi,
I am trying to do database schema migration from postgresql to mysql. I tried the hibernate reverse engineering tool to generate the hbm and pojo class files and successfully created them. After that I tried to export the schema using the command
SchemaExport shmExprt = new SchemaExport(config); shmExprt.create(false,true);
Initially when i tried for one table the table was created in the mysql database.. After that i wanted to try for all the tables and its giving the following error
Exception in thread "main" org.hibernate.MappingException: Foreign key (FK1177EF0C9A5F4FCA:d_books_claim [str_empno])) must have same number of columns as the referenced primary key (m_pis_master [str_empid,str_empno]) at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:90) at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73) at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1123) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1062) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1146) at cdac.pis.db.CreateTables.main(CreateTables.java:18)
please help
_________________ PSGMATHI
CDAC,Chennai
|