-->
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.  [ 2 posts ] 
Author Message
 Post subject: Why blob size is generated for DB2
PostPosted: Sun Oct 07, 2007 3:09 pm 
Newbie

Joined: Sun Oct 07, 2007 3:00 pm
Posts: 2
Hi My app is Spring with JPA/Hibernate supports multiple databases.

for columns with @Lob type, hbm2dll generates a default 255 byte clob/blob size for DB2. Other dialect does not have the size generated

Because of this behavior, I have to annotated explicitly the size

@Lob @Column ( length = somefix number )

other dialects do ingnore the specified length during hbm2dll export.

Is this an intended for DB2? I found very odd to specify the length
since I dont know how big it could be at runtime

Thanks

-D


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 19, 2007 9:18 am 
Newbie

Joined: Sun Oct 07, 2007 3:00 pm
Posts: 2
Here is the answer in case any one needs it.

Among supported databases, DB2 and Derby ( DB2Dialect) support
settings of blob/clob size. The default for DB2 is 1M, max is 1G.

Without setting the size, hibernate will set it to 256 bytes. Should Hibernate use DB2 default size instead rather create its own default?

In my case, I set all @Lob's length to 1M to make DB2/Derby happy.
The length is ignored by other dialects


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