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 a string that exceed maxlenght
PostPosted: Fri Jun 29, 2007 12:18 pm 
Newbie

Joined: Fri Jun 29, 2007 12:09 pm
Posts: 1
Hi, im new at this and i have a problem, i need to persist a string into the DB but the problem is if the string exceed the maxlength of a DB, in that case i want to hibernate cut off the part that exceed and save it anyway without throwing any exception.

Thanks

PS: sorry for my poor english.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 12:23 pm 
Newbie

Joined: Tue Jun 26, 2007 3:24 pm
Posts: 11
Why not just catch the exception that hibernate throws if it does exceed the max length, trim the string, then try saving it again in hibernate?


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.