-->
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 to serializae an array as binary ?
PostPosted: Thu Sep 11, 2003 6:40 am 
Newbie

Joined: Wed Aug 27, 2003 3:09 am
Posts: 17
Hello,

I want to store a String array as a binary object in database.

I use
Code:
/**
     * @hibernate.property
      * type = "serializable"
     */
    public String[] getColumnAlgorithmParameters() {
        return columnAlgorithmParameters;
    }


but xdoclet generates
Code:
create table task (
   id BIGINT NOT NULL AUTO_INCREMENT,
   columnAlgorithmParameters VARCHAR(255) BINARY,
   primary key (id)
)


I don't think the above mapping is correct.I acutally want to put the whole array as a large binary object.

Also, If i have an object of type MyObject and it is a property of the Parent Object.To serialize it as binary, should i specific it as


Code:
/**
     * @hibernate.property
      * type = "serializable"
     */


Pls give some hints!

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 11, 2003 6:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
type="serializable" is correct. you can customize the column type using @hibernate.column sql-type="..."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 11, 2003 7:06 am 
Newbie

Joined: Wed Aug 27, 2003 3:09 am
Posts: 17
Thank you...

How about a whole object?

I want to serialize an object to a column..

I guess i would have to implements serializable and implement the serialize method..


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.