-->
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: Foreign key name ($1) mapped to different tables!
PostPosted: Tue Nov 08, 2005 2:22 pm 
Newbie

Joined: Tue Nov 08, 2005 12:51 pm
Posts: 3
Hibernate version:
Hibernate tools 3.1 beta1

Name and version of the database you are using:
PostgresSQL 7.4.8

Hi,

I'm trying to generate mapping files (etc) direct from a third-party schema using the Eclipse plug-in. I'm getting the error message:

Code:
Foreign key name ($1) mapped to different tables. previous:
org.hibernate.mapping.Table(public.cvterm_dbxref) current:
org.hibernate.mapping.Table(public.cvterm_relationship)


This is happening more than once ie if I exclude these tables using the reveng.xml I get the same message on different tables.

1) Is this saying that one column in a particular table is mapped to two different foreign keys, or have I misunderstood?

2) Presumably the $1 is supposed to be expanded to table/column name. Is there a way to modify the logging level for the plug-in to see if there's any more clues?

Thanks for any advice,
Adrian


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 5:45 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
$1 *is* the automatic foreign key name postgressql in previous versions generated for unnamed foreignkeys.

either upgrade to newer postgressql or name your relationsships so they get unique.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 1:04 pm 
Newbie

Joined: Tue Nov 08, 2005 12:51 pm
Posts: 3
Ah, OK, I'll try with Postgres 8.

Many thanks for the advice.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 9:51 am 
Newbie

Joined: Tue Nov 08, 2005 12:51 pm
Posts: 3
For future reference for any other Postgres users out there, Max's solution was spot-on.


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.