-->
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: Hibernate 1.0.2.0 and varbinary (or image) > 8000 bytes
PostPosted: Fri Jun 01, 2007 11:55 am 
Newbie

Joined: Fri Jun 01, 2007 11:45 am
Posts: 2
Hello,

I use nhibernate 1.0.2.0 but I cannot persist byte[] when its size exceeds 8kb. I tried with image or varbinary(max) in the db (sql server 2005).

Everything works fine for small documents( < 8000 bytes).
In the mapping : <property name="Resume" column="RESUME"/>
Specifying the sql-type in the mapping has no effect.

I check the length with select len(resume) from Mytable and it returns 8000, even when I persist larger document.

Unfortunately upgrading to 1.2 is not really an option

Any idea ?

Thanks,

Gengis,


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 02, 2007 11:16 am 
Regular
Regular

Joined: Mon Mar 20, 2006 10:49 pm
Posts: 59
Try adding length="100000" as an attribute to the property element. I know this works with 1.2.

_________________
Mike Abraham


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 03, 2007 5:54 am 
Beginner
Beginner

Joined: Tue May 02, 2006 8:04 am
Posts: 34
Map it as BinaryBlob (type="BinaryBlob")


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 11, 2007 5:06 pm 
Newbie

Joined: Fri Jun 01, 2007 11:45 am
Posts: 2
Thanks ben, it works;


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.