-->
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: Store none serializable object ?
PostPosted: Sat May 27, 2006 9:17 am 
Newbie

Joined: Sat May 27, 2006 8:51 am
Posts: 1
Hi everyone ,

I have kind of problem ,I have a class called Message :


Code:
public class Message implements Serializable {
   
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
   
    @OneToMany(cascade=CascadeType.ALL)
    private Collection<Message> replies;
   
    @Lob
    private Address address;
    @Lob
    private MimeMessage mimeMessage;

    private String fromContact;
    private String replyToContact;

...
}


the problem of this is the MimeMessage class (javax.mail.internet.MimeMessage) ,I'm trying to store it in a field but now I see the class has no Serializable interface implemented in it.

Also the class has a way of writing it self "serialize" by
MimeMessage.writeTo(java.io.OutputStream view java.io.OutputStream download java.io.OutputStream.java out)

but this tricky , how can I make my mimeMessage object load normaly ?

best regards ,

nnaass

-------------------------------------------------------------------------------
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
hibernate-3.2.0.cr2
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
MySQL 5
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Code:


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 27, 2006 11:57 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
You can define your UserType.


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.