-->
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: problem with type string ID
PostPosted: Wed Jul 18, 2007 11:42 am 
Newbie

Joined: Wed Jul 18, 2007 9:05 am
Posts: 4
Location: France
Hibernate version: 3.2

I have a probleme when I use a string ID ... when the TwoPhaseload try to resolve associations.
I obtain an error that say : Provided ID of the wrong type. Expected: class java.lang.long, got class jave.lang.String

I don't understand what's wrong ???

(Excuse my poor Frenchy English)


Top
 Profile  
 
 Post subject: Re: problem with type string ID
PostPosted: Thu Jul 19, 2007 3:06 am 
Beginner
Beginner

Joined: Wed Jul 18, 2007 7:38 am
Posts: 23
tletelli wrote:
Hibernate version: 3.2

I have a probleme when I use a string ID ... when the TwoPhaseload try to resolve associations.
I obtain an error that say : Provided ID of the wrong type. Expected: class java.lang.long, got class jave.lang.String

I don't understand what's wrong ???

(Excuse my poor Frenchy English)

I think that in ur mapping file u have given id type as long please check
the .hbm.xml and the class file.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 3:40 am 
Newbie

Joined: Wed Jul 18, 2007 9:05 am
Posts: 4
Location: France
Thanks for your answers

No it is not the case
the used type is type="string"
and i use the assigned generator

As i read into hiberate reference manual I think i can not use string ID


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 5:57 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

You can use string ids . please send your .hbm.xml and class file to more detail


Amila

(Don't forget to rate if helps)


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.