Hello.
I have two classes (Client and ClientLocale). I am trying to figure out how to maintain a list (or set) of java.util.Locale that the client supports (used for localization in the web app, using Wicket).
The locales are stored in a set in the Client entity, as: private Set<Locale> clientLocales = new HashSet<Locale>();
with the relevant get and set methods
The Client table has the following (relevant) structure: ID varchar(36) Name varchar(32)
The ClientLocale table has the following structure: ClientID varchar(36) Locale varchar(15)
The reading I have done mostly seemt to be about situations where there is a join table (which I am using elsewhere successfully in the Client entity). However, I can't find any pointers to the best way to link these two tables. I was thinking that a OneToMany annotation woudl do the job, but I can't find out how to let the annotation know which columns are the links.
I was considering creating a ClientLocale entity, but was under the impression that this would not be necessary.
Any pointers or hints that you have would be greatly appreciated.
Thanks,
Bruce.
|