-->
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.  [ 1 post ] 
Author Message
 Post subject: Wrong add constraint statement for informix dialect
PostPosted: Wed Jul 10, 2013 4:08 am 
Newbie

Joined: Tue Sep 21, 2004 3:47 am
Posts: 8
Hi,

I am using JPA with Hibernate 4.2.1. I have a mapped field of type varchar which is marked with unique=true. Hibernate generates the following on schema creation:

alter table CONTENT_TYPE drop constraint UK_bj57mo7jmskov9s34ylf5wa18
10:01:00,924 DEBUG [org.hibernate.tool.hbm2ddl.SchemaUpdate] (http--0.0.0.0-9090-5) alter table CONTENT_TYPE add constraint UK_bj57mo7jmskov9s34ylf5wa18 unique (TYPE)

Unfortunatelty no unique constraint is existing in the informix database. Tried to execute the add constraint statement without success. In the informix documentation there is no name defined for the constraint. After removing the name it works:

alter table CONTENT_TYPE add constraint unique (TYPE)

Is this a bug in the informix dialect?

Cheers
Oliver


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

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.