-->
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.  [ 4 posts ] 
Author Message
 Post subject: how can i map this type
PostPosted: Tue Apr 27, 2004 3:38 am 
Newbie

Joined: Thu Apr 01, 2004 5:24 am
Posts: 2
Hi all

I have an project using hibernate. We have an Class named "Program" and it has some attributes.
There is a attribute named "params" containing the type of list of Integer(String ....), in brief, is a list of basic types. And i want map the Class Program in table ,but i would not like use some wrapper class to wrap the basic types.
I used 'any' type ,but i found that i have to make some almost "useless" wrapper classes for that.

any idea!!!
Excuse for my English.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 3:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
http://www.hibernate.org/hib_docs/reference/en/html/collections.html#collections-ofvalues - use <element>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 4:49 am 
Newbie

Joined: Thu Apr 01, 2004 5:24 am
Posts: 2
thanks for the reply.


michael said:
Quote:
use <element>


i'm not quite sure about how to use it. maybe i should express myself more clearly. the "params" of the "Program" is a collection of Object , maybe containing any basic type(String,Integer etc.)

use <element>, i can only map to only one single type of that , can't i?

or can you please explain it for me about how to use that?

thanks a lot.
[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 5:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This is not possible, a collection containing different object types is crap anyways. Use a wrapper type or something.


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