-->
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.  [ 5 posts ] 
Author Message
 Post subject: identifier of an instance altered from 1 to 1
PostPosted: Wed Dec 19, 2007 3:44 am 
Newbie

Joined: Thu Dec 13, 2007 8:53 am
Posts: 7
Hi ,

We are using hibernate with teradata . We have a string as a primary key and the java type is also java.lang.String as mentioned below .

<class name="com.liferay.portal.model.impl.GroupImpl" table="Group_">
<cache usage="read-write" />
<id name="groupId" type="java.lang.String">
<generator class="assigned" />
</id>

The getters and setters also have String type.

I am getting this error again .

Error :

identifier of an instance of com.liferay.portal.model.impl.GroupImpl was altered from 1 to 1

Pls help.

Chandra


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 4:48 am 
Regular
Regular

Joined: Sat Nov 25, 2006 11:37 am
Posts: 72
Could this be a simple padding issue? If your db column is defined as char(n) a SQL standards compliant db will pad any string you insert with spaces up to the full length. So if your column is char(5) and you insert '1' when you read it back you would get '1 '.


Top
 Profile  
 
 Post subject: identifier of an instance altered from 1 to 1
PostPosted: Wed Dec 19, 2007 5:13 am 
Newbie

Joined: Thu Dec 13, 2007 8:53 am
Posts: 7
Hi ,

Thanks for your quick reply . In the database , the data type defined for groupId column is VARCHAR and not char .

Pls help .

Thanks ,

Chandra


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Wed Dec 19, 2007 6:05 am 
Newbie

Joined: Thu Dec 13, 2007 8:53 am
Posts: 7
Hi malm66 ,

Thanks for your valuable reply . I got the issue and fixed the problem .

Thanks a lot .

Chandra


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Wed Dec 19, 2007 6:50 am 
Newbie

Joined: Thu Dec 13, 2007 8:53 am
Posts: 7
Hi malm66 ,

Thanks for your valuable reply . I got the issue and fixed the problem .

Thanks a lot .

Chandra


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