-->
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: LONGBLOB Exception
PostPosted: Thu Jan 28, 2010 7:20 am 
Newbie

Joined: Tue Aug 25, 2009 10:02 am
Posts: 2
Hi,

I'm using MySQL DB and I'm trying to use a LONGBLOB field.

when I run:
Code:
var conf = new Configuration();
            conf.Configure();
_sessionFactory = conf.BuildSessionFactory();


With this mapping:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
               assembly="Errore"
               namespace="Errore">
  <class name="Documento" table="Documenti">
    <id name="Id">
      <generator class="identity"/>
    </id>
    <property name="FileRawData" not-null="false"/>
  </class>
</hibernate-mapping>


and this class:
Code:
   public class Documento
    {
        public Documento(){}

        public virtual int Id { get;  set; }
       
        public virtual byte[] FileRawData { get; set; }
    }


I get overflow exception for type Int32.

I downloaded sourcecode and I think I've found the problem.
In class "AbstractColumnMetaData : IColumnMetadata"
there is "private int columnSize;" and LONGBLOB size (4GB) exceed int size!

I tryied to change in Int64 and it seems ok... but... is this the correct solution??

danyolgiax


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.