-->
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.  [ 3 posts ] 
Author Message
 Post subject: How can I force serialization?
PostPosted: Thu Dec 07, 2006 8:36 am 
Newbie

Joined: Thu Nov 09, 2006 5:32 am
Posts: 8
Hi
I have a Map property wich I want to be persisted serialized.
The actual value of the property is a serializable implementattion of Map.
Can I force hibernate to serialize this property?
I tried @Basic but doesn't work. Also tried @Basic + @Lob but still doesn't work.
I don't want to change property type to the concrete Map implementation nor create a SerializableMap interface.

Please help,
Octav


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 07, 2006 1:32 pm 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Use UserType / Custom type:
- http://www.hibernate.org/hib_docs/v3/re ... pes-custom


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 08, 2006 7:19 am 
Newbie

Joined: Thu Nov 09, 2006 5:32 am
Posts: 8
Thanks, but I was actually looking for: @Type(type="serializable")

Found the answer in Hibernate Annotations FAQ:
http://www.hibernate.org/329.html#A11

Octav


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