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.  [ 1 post ] 
Author Message
 Post subject: A collection of strings inside an object
PostPosted: Tue Aug 18, 2009 12:53 pm 
Newbie

Joined: Tue Aug 18, 2009 12:42 pm
Posts: 1
LS,

I am trying to include a collection of countries (strings) inside a Movie object. The countries of origin strings are in a seperate db table from the Movie data table. The two tables are associated via a link table, that has the ID's of the parent Movie (one) and child countries (many).

My questions:

1) Is it possible to read the countries as strings into Movie, or do I have to create a StringO object that will be placed in the collection?
Somebody suggested, to create the string as a value object, but how can I do that and is it necessary?
(I do not need to persist the countries information, just read it)

2) How do I join the countries table to the Movie class in order to retrieve the values?

It seems like a really basic issue that will pop up often when using a legacy DB.

Thank you in advance,
Marek


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.