-->
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.  [ 1 post ] 
Author Message
 Post subject: byte[] mapping with MySQL and Hypersonic
PostPosted: Thu Apr 14, 2005 8:22 am 
Newbie

Joined: Tue Nov 16, 2004 11:22 am
Posts: 6
I need to map a byte[] to a database column. This byte[] could contain zeros, so I use a BLOB.

Code:
<property name="myData"
                type="binary"
                update="true"
                insert="true"
                access="property">
   <column name="myData"
                sql-type="blob"/>
</property>


This allows me to save byte arrays such as 0,1,2,3,0,1 to a MySQL database. I can view the data in the MySQL browser exactly as entered.

However:
If I use the Hypersonic Database it complains that it cannot understand the BLOB type.
If I use the VARBINARY type then MySQL complains.
If I remove the SQL-TYPE statement, then a VARCHAR is created in the MySQL database and the data above is viewed as empty (the first 0 works like a null).

Does anyone know how I can use binary data with both MySQL and Hypersonic?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.