-->
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: data type binary maps to varbinary in SQL Server
PostPosted: Thu Feb 10, 2005 12:46 pm 
Beginner
Beginner

Joined: Tue Jan 18, 2005 9:37 am
Posts: 29
Location: The Netherlands
Hi,

We are using Hibernate with a Firebird and a MS SQL server database and we want to use large binary fields with the java type byte[](which is prefered over java.sql.Blob according to 'Hibernate in Action'), so we have chosen the hibernate type 'Binary'

When we generate a schema for Firebird it creates a nice BLOB field for the data, which is fine, because it's unlimited in length. However for SQL server the SchemaExport creates a Varbinary field, which has a limited length of 8,000 characters.

I know that I can override the translation from Binary to varbinary by setting the sql-type property to 'IMAGE' in the mapping file, but if I do this then SchemaExport will also try to create an IMAGE datatype for firebird, which is inpossible...

Any hints on how to solve this?


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.