-->
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.  [ 4 posts ] 
Author Message
 Post subject: why does not it get foreign keys?
PostPosted: Thu Oct 26, 2006 3:54 pm 
Newbie

Joined: Wed Oct 25, 2006 8:18 am
Posts: 4
On hibernate tools i was very satisfied with automatic code generation.

It did get the foreign key relations well in Apache DERBY. and liked that feature.


However the same table structure on Postgresql and MAX DB gave errors :(

Below is the sample. I could not find any information on google ...

Can you please help ?

Thanks a lot.

*****

eclipse.buildId=M20060629-1905
java.version=1.5.0_08
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

Warning
Thu Oct 26 22:19:24 EEST 2006
WARN Worker-15 org.hibernate.cfg.reveng.JDBCReader - Exception while reading foreign keys for org.hibernate.mapping.Table(TURQ_MODULES) [org.hibernate.exception.GenericJDBCException: Error while reading exported keys meta data for public.TURQ_MODULES]

org.hibernate.exception.GenericJDBCException: Error while reading exported keys meta data for public.TURQ_MODULES
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$5.handleSQLException(JDBCMetaDataDialect.java:284)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:50)
at org.hibernate.cfg.reveng.JDBCReader.processForeignKeys(JDBCReader.java:169)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:93)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:97)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:57)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: org.postgresql.util.PSQLException: The column name FKTABLE_CAT not found.
at org.postgresql.jdbc1.AbstractJdbc1ResultSet.findColumn(AbstractJdbc1ResultSet.java:673)
at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:475)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$5.convertRow(JDBCMetaDataDialect.java:274)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:47)
... 9 more


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 26, 2006 4:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use an more uptodate driver. postgressql had at some point drivers that had "FKTABLE_CATALOG" instead of the spec compliant "FKTABLE_CAT".

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 5:22 am 
Newbie

Joined: Wed Oct 25, 2006 8:18 am
Posts: 4
Thank you a lot. it solved my problem.

Now it works great !..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 29, 2008 8:37 am 
Newbie

Joined: Thu Feb 28, 2008 12:18 pm
Posts: 10
Are you able to generate foreign keys in mapping files for derby db?

I'm still facing same problem.

Thanks
Raghunath


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.