-->
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.  [ 10 posts ] 
Author Message
 Post subject: BLOB SUB_TYPE TEXT with Firebird
PostPosted: Mon Dec 11, 2006 10:37 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
Hi all,

I try to use BLOBs fields with Firebird 1.5.3 and Nhibernate 1.2.
Of course, It does not work for the first time ;-)
I've got NHibernate.ADOExceptions while mapping BLOBs.

So, how to map a Firebird BLOB field ?

I try these mappings without success :
Code:
<property column="MYCOLUMN" type="String" name="MyColumn"/>
<property column="MYCOLUMN" type="FirebirdSql.Data.FirebirdClient.FbDbType.Text" name="MyColumn"/>
<property column="MYCOLUMN" type="FirebirdSql.Data.FirebirdClient.FbDbType.Text, FirebirdSql.Data.FirebirdClient" name="MyColumn"/>


Please help.

I'm using :
- .Net Framework 2
- FirebirdSql.Data.FirebirdClient 2.0.1.0
- NHibernate 1.2.0.2002
- Firebird 1.5.3.4870


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 5:17 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
no idea ?


Top
 Profile  
 
 Post subject: Re: BLOB SUB_TYPE TEXT with Firebird
PostPosted: Tue Dec 12, 2006 5:35 am 
Expert
Expert

Joined: Thu Jan 19, 2006 4:29 pm
Posts: 348
Neoseifer wrote:
I try these mappings without success :
Code:
<property column="MYCOLUMN" type="String" name="MyColumn"/>
<property column="MYCOLUMN" type="FirebirdSql.Data.FirebirdClient.FbDbType.Text" name="MyColumn"/>
<property column="MYCOLUMN" type="FirebirdSql.Data.FirebirdClient.FbDbType.Text, FirebirdSql.Data.FirebirdClient" name="MyColumn"/>



Maybe
Code:
<property column="MYCOLUMN" type="StringClob" name="MyColumn"/>


As per http://www.hibernate.org/hib_docs/nhibernate/html/mapping.html#mapping-types-basictypes

Gert

_________________
If a reply helps You, rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 5:53 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
This type does not work neither :(
NHibernate returns a LazyInitializationException

And in the log, I have :
Code:
ADOExceptionReporter:32 - System.ArgumentOutOfRangeException:


1996
1999

Nom du paramètre : Invalid value for Creations
La valeur réelle était


1996
1999
.


Wich can be translated from french into :
Code:
ADOExceptionReporter:32 - System.ArgumentOutOfRangeException:


1996
1999

Parametre name : Invalid value for Creations
The real value was


1996
1999
.


"Creations" is the name of the BLOB column

And...
Code:


1996
1999
is the data from the BLOB field.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 6:12 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
Do not search anymore, that was a problem from my code.
Due to an auto-generated setter by MyGeneration...

Tantk you for your help anyway !!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 6:12 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
Do not search anymore, that was a problem from my code.
Due to an auto-generated setter by MyGeneration...

Thank you for your help anyway !!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 6:12 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
Do not search anymore, that was a problem in my code.
Due to an auto-generated setter by MyGeneration...

Thank you for your help anyway !!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 6:14 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
Arg, sorry for this 3 posts. How can I delete them ? :(
Today, I'm a loser !! I think I'll go back in my bed..


Anyway, String and StringClob work both very well :)


Top
 Profile  
 
 Post subject: Problem with auto-generated BLOB from MyGeneration
PostPosted: Tue Jan 16, 2007 3:39 pm 
Newbie

Joined: Thu Jan 11, 2007 12:46 pm
Posts: 4
So, what was wrong with the auto-generated code for the blob, and how did you fix it?

I'm sure I'm about to have the same problem.

_________________
Dan Cooperstock
info@FreeDonationSoftware.org


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 4:24 am 
Newbie

Joined: Wed Dec 06, 2006 5:41 am
Posts: 10
The auto generated mapping for a blob specify
Code:
length = 0


Just don't specify a length for a blob mapping and it works good.


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