-->
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.  [ 3 posts ] 
Author Message
 Post subject: Reverse engineering problem with composite primary key
PostPosted: Fri Feb 20, 2009 1:41 pm 
Newbie

Joined: Fri Feb 20, 2009 7:45 am
Posts: 2
Location: Hamburg, Germany
Hello,
I have a problem reverse engineering domain code from a sybase anywhere 10 database.

For every table with composite primary key i get the following exception:

org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey.

Her is one example:

create table DCALLS
(
AES timestamp default timestamp,
APPLID char(8) not null,
DIALOG integer not null,
COUNTER integer,
constraint PK_DCALLS primary key (APPLID, DIALOG)
);

org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey.
Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS)
Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS)


all Tables with single key are fine.

configuration:
Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154
Hibernate version: hibernate-3.2.6.ga.zip
Database: Sybase SQL Anywhere 10.0.1.3415
JDBC-Driver: jconnect 6.05
Eclipse Version: 3.4.0

Code Generation Configuration:
Use Java 5 syntax and generate EJB3 annotations switched on.
Exporters: domain code.



Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2009 3:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sounds like a sybase specific issue - for some weird reason they don't set PK_NAME to the same value for the whole primary key; they use unique names for that which is wrong according to how I understand the spec.

Please report issue in jira and with info on where I can get a sybase installation to test on if you got that ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Reverse engineering problem
PostPosted: Fri Feb 20, 2009 5:05 pm 
Newbie

Joined: Fri Feb 20, 2009 7:45 am
Posts: 2
Location: Hamburg, Germany
Hi Max

Ireported this issue to jira : http://opensource.atlassian.com/project ... e/HBX-1112

Christian


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