-->
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.  [ 5 posts ] 
Author Message
 Post subject: Blob type for @Type(type="serializable")
PostPosted: Tue Dec 12, 2006 10:48 am 
Newbie

Joined: Thu Nov 09, 2006 5:32 am
Posts: 8
Hi,
@Type(type="serializable") is exported to ddl as tinyblob.
Is there a way to change this?

Thanks,
Octav


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 13, 2006 4:35 am 
Newbie

Joined: Thu Nov 09, 2006 5:32 am
Posts: 8
Just discovered org.hibernate.type.SerializableToBlobType.

Is there a typedef for it?

Octav


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 17, 2006 4:57 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
@Lob

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 18, 2006 9:22 am 
Newbie

Joined: Thu Nov 09, 2006 5:32 am
Posts: 8
Ok, but @Lob doesn't work here because the return type of the getter I'm annotating is not implementing Serializable (it's Map). The actual return type is a serializable implementation of Map. If I use @Lob I get "com.v2.common.EncodableEnumMap cannot be cast to java.sql.Blob".

Thanks,
Octav


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 18, 2006 2:15 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
ah Map might be problematic, but generally speaking Serializable
are stored in a blob of @Lob is used.

In SimpleValueBinder

Code:
else if ( mappings.getReflectionManager()
               .toXClass( Serializable.class )
               .isAssignableFrom( returnedClassOrElement ) ) {
            type = SerializableToBlobType.class.getName();
            //typeParameters = new Properties();
            typeParameters.setProperty(
                  SerializableToBlobType.CLASS_NAME,
                  returnedClassOrElement.getName()
            );
         }

_________________
Emmanuel


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