-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate and trim()
PostPosted: Mon May 10, 2010 4:34 pm 
Newbie

Joined: Mon May 10, 2010 3:58 pm
Posts: 2
Hi, I am facing a problem. I have table containing one CHAR(8) column which is part of the key.
When I call merge() on a persisted entity, hibernate will insert instead of update the row. The entity contains the trimmed string while DB has white space padding.
Any work around for this issue? Thanks a lot!


Top
 Profile  
 
 Post subject: Re: hibernate and trim()
PostPosted: Tue May 11, 2010 9:43 am 
Beginner
Beginner

Joined: Fri Aug 24, 2007 9:47 am
Posts: 21
are you sure its hibernate who do it, i think it's your SGBD.
Are you working in DB2, oracle or something else ?

_________________
recherche-programmeur.fr


Top
 Profile  
 
 Post subject: Re: hibernate and trim()
PostPosted: Tue May 11, 2010 6:05 pm 
Regular
Regular

Joined: Tue May 11, 2010 5:50 pm
Posts: 54
Location: Norman, Ok, U.S.A
Try calling saveOrUpdate() on it and see if that makes a difference


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