-->
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: Resizing a column - hibernate not picking it up
PostPosted: Wed Jun 13, 2007 8:51 am 
Newbie

Joined: Tue Jun 13, 2006 3:24 pm
Posts: 5
Hi,

I am using Hibernate 3.0. I have a column mapping a String to a varchar(255) in mySQL. I upped the size of the column in the DB to varchar(2048) and restarted the server, but it seems that Hibernate is still cutting off the text at the old limit (255).

Is there something else that needs to be modified?


Top
 Profile  
 
 Post subject: Re: Resizing a column - hibernate not picking it up
PostPosted: Wed Jun 13, 2007 9:02 am 
Newbie

Joined: Tue Oct 25, 2005 6:04 am
Posts: 10
Hibernate may truncate your strings to avoid warnings/errors from the database. Try adding a length attribute to your property mapping:

Code:
<property name="someString" length="2048">


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 13, 2007 9:29 am 
Newbie

Joined: Tue Jun 13, 2006 3:24 pm
Posts: 5
DOH! Coding error, not hibernate at all. A refresh was being done on the object (flushing the changes and returning the column back to its pre-saved contents..."


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.