-->
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: MS SQL Server GUID as UserType doesn't load associations
PostPosted: Fri Jun 10, 2005 7:50 am 
Beginner
Beginner

Joined: Fri Nov 19, 2004 6:41 am
Posts: 39
Location: Stockholm, Sweden
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

3.0.5

Mapping documents:

-

Code between sessionFactory.openSession() and session.close():

-

Full stack trace of any exception that occurs:

-

Name and version of the database you are using:

MS SQL Server 2000

The generated SQL (show_sql=true):

-

Debug level Hibernate log excerpt:


Hello!

I've created a MS SQL Server user type, SqlServerGuid.java and SqlServerGuidUserType.java.

My problem is that when I create a SqlServerGuid with the GUID string in upper case Hibernate seems to be unable to load the associations?! I'm using the Session.get(Class, Serializable) method.

When I create a SqlServerGuid with the GUID string in lower case, Hibernate successfully loads the associations!

According to the log it seems like Hibernate have all GUID's in lower case, is this an internal thing in HIbernate - converting GUID from database to lower case?

The +equals(o:Object):boolean method in SqlServerGuid.java uses +equalsIgnoreCase(o:Object):boolean.

I could post the entire code, but I'm posting just to get a quick answer if anyone recognize this problem?

Kind regards, Andreas

PS. At the moment I haven't implemented equals/hashCode in my domain objects, could this have something to do with it?


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.