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
|