-->
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.  [ 5 posts ] 
Author Message
 Post subject: mapping fields with a collection
PostPosted: Fri Oct 28, 2005 9:59 am 
Newbie

Joined: Fri Oct 28, 2005 9:08 am
Posts: 12
I have a table with several fields that have the same properties (the same data types, the same sizes,...).
I have also other fields in this table.

Is it possible to map the fields that have the same properties directly with a collection ?

--> The fields that have the same properties must be directly mapped with a collection in the associated business object and the other fields are mapped normally.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 11:21 am 
Newbie

Joined: Tue Mar 29, 2005 5:34 pm
Posts: 19
Can you give an example of the tables?

_________________
Robert Fulcher


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 11:31 am 
Newbie

Joined: Fri Oct 28, 2005 9:08 am
Posts: 12
example of a table :

NUMMSG NUMBER
ARGTBL VARCHAR
LIB1 VARCHAR
LIB2 VARCHAR
LIB3 VARCHAR
LIB4 VARCHAR
STAT VARCHAR

I want to map LIB1,LIB2,LIB3 and LIB4 with a collection (List or Map,...) and not an attribute for each field in table.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 11:38 am 
Newbie

Joined: Tue Mar 29, 2005 5:34 pm
Posts: 19
When you say a map you are wanting to load the data in LIB1,LIB2,LIB3 and LIB4 into a collection, so you want to store collection data into these fields?

_________________
Robert Fulcher


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 29, 2005 2:59 pm 
Newbie

Joined: Fri Oct 28, 2005 9:08 am
Posts: 12
I want this structure in the business object for the table I have described :

Integer nummsg;
String argtb;
Set lib;
String stat;

where lib contains LIB1,LIB2,LIB3 and LIB4.


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