[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1112) Reverse engineering problem with composite primary key

Burkhard Vogel (JIRA) noreply at atlassian.com
Mon Jul 20 21:27:12 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33644#action_33644 ] 

Burkhard Vogel commented on HBX-1112:
-------------------------------------

hmmm - I found some discussion I had on the Sybase jConnect forum [1]:
"I hate to be the bearer of bad news - but it's a bug in the Hibernate
reverse engineering libraries. I ran in to this last year when I was
trying to do the same thing. I traced it all the way back to the
hibernate code. It turns out they don't deal well with some return
types. They are legal ANSI SQL, but I think that iAnywhere is the only
one that does them this way.

I'll see if I can dig out the exact things I found - but this might give
you a head start on solving the problem.

Oh, FYI, I couldn't figure out a way around it. Eventually I just gave
up and created views that solved the problem for me.


Jonathan"
This Jonathan Baker guy seems to be a Sybase employee/developer...

[1] http://forums.sybase.com/cgi-bin/webnews.cgi?cmd=item-2630&group=sybase.public.jconnect

> Reverse engineering problem with composite primary key
> ------------------------------------------------------
>
>                 Key: HBX-1112
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112
>             Project: Hibernate Tools
>          Issue Type: Bug
>    Affects Versions: 3.2.4 Beta1
>         Environment: 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.
>            Reporter: Christian Meyer
>
> 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)
> );
> For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster
> I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list