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: is it possible to save an array without creating another tab
PostPosted: Mon Mar 15, 2004 7:17 pm 
Newbie

Joined: Mon Mar 15, 2004 3:30 pm
Posts: 6
I have a property:

public int [] xxx(){...}

it's a array of int. so when it's physically store in the database, i hope it can be store in a filed like this {1,3,535,232,22}, not saving it to a new table.

I 've had a look at collections, arrays of hibernate. it seems it only supper one to many, many to many relationship. that means i have to create a new table for storing arrays.

is it possible to save an array without creating a new table?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 15, 2004 7:19 pm 
Expert
Expert

Joined: Thu Jan 08, 2004 6:17 pm
Posts: 278
Not without creating your own Persister or UserType or some other kind of interposing class. It certainly is not the default way to map arrays in Hibernate.

Cheers,
Rob


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2004 10:12 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
UserType would be fine and more simple I guess

_________________
Emmanuel


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.