-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem in Hibernate Reverse Engineering - SchemaExport
PostPosted: Thu Jun 23, 2011 6:14 am 
Newbie

Joined: Wed Dec 17, 2008 7:40 am
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: Problem in Hibernate Reverse Engineering - SchemaExport
PostPosted: Thu Jun 23, 2011 6:29 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
This is a known bug, please look throught this forum for workaround.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.