-->
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.  [ 4 posts ] 
Author Message
 Post subject: Is it a bug? (mapping type="text" - truncates
PostPosted: Fri Apr 22, 2005 5:21 am 
Newbie

Joined: Wed Mar 02, 2005 6:28 pm
Posts: 13
Hibernate version: 3.0.1
Mapping documents:
<property name="body" column="pt_body" type="text"/>

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

Name and version of the database you are using:
Mysql 4.1.11

Well the problem I have is that when I'm saveing object properties which are mapped as "text" to Myqsl type="text" I'm losing the second half of all not latin charactes. I'm using utf8 encoding.

So, is it a bug or I use a wrong mapping?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 5:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Check if your encoding parameter in the JDBC url is correct.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 7:23 am 
Newbie

Joined: Wed Mar 02, 2005 6:28 pm
Posts: 13
I think it's correct.
Code:
        <property name="hibernate.connection.characterEncoding">UTF-8</property>
        <property name="hibernate.connection.useUnicode">true</property>


But if I use string for my hibernate mapping and SQL type="text" there's no trunction of characters. The only problem is that when I use SchemaExport and it outputs SQL type="string" and I'll have to edit it by hand.


Top
 Profile  
 
 Post subject: MySQL driver problem
PostPosted: Wed Nov 02, 2005 11:07 am 
Newbie

Joined: Wed Nov 02, 2005 11:00 am
Posts: 12
Location: Austria, Vienna
Hi,

I had the same problem ... it turned out to be a MySQL JDBC driver problem.

The version which caused the problems was Connector/J 3.1.10. I'm now using 3.1.11 and the problem is gone.

See:

http://forum.hibernate.org/viewtopic.ph ... 45#2269345

... which describes the same problem!

RĂ¼diger Engelberger


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