-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problem with UUID's in MS SQL SERVER 2000
PostPosted: Thu Apr 06, 2006 5:00 pm 
Newbie

Joined: Thu Apr 06, 2006 4:44 pm
Posts: 1
Hi I can not found it any where. I have a table where primary key is UUID I made a mapping in X-Doclet :


/**
* @hibernate.class table="HomePages"
*/
public class HomePages implements Serializable {
private long hp_Id;

/**
* This tag marks the primary key field
* and column in database.
* @hibernate.id generator-class="native" column="hp_Id"
*/
public long getHp_Id() {
return hp_Id;
}

...

I alsow try version with

private String hp_Id;

both not working I get

org.spring.jdbc.UncategorizedSQLException : Hibernate operation : could not execute query ...

any Ideas ?

thx very much
wonglik


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 07, 2006 12:18 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Use the guid generator, not native. The java type will be String, though I believe that you can get a GUID class and associated GuidUserType: I've never used them, String works fine for me.

Fixing this isn't likely to make your exception go away. Can you post the full text of your exception? Especially any and all nested exceptions, as the spring exception isn't going to help.


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