-->
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: Session.Get with string primary key
PostPosted: Sun May 06, 2007 8:12 pm 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
Hi,

We have an object with a string property as the primary key. When we call Session.Get to retrieve an object from the DB, the primary key seems to be populated from the id parameter in the Get method rather than from the DB.

I say this because we have all upper case in the DB but if we do a Get with a lower case primary key value (and a case insensitive DB), then the loaded object has the lower case value in the key property which is not correct.

Is this a bug or is there something in the mapping that we might have wrong?

Thanks,

Jason


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 07, 2007 1:35 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
It works as intended. You should really decide upon the case of your primary keys, or use some custom case-insensitive string type (implementing IUserType).


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.