I have a table with integers in various columns (e.g., job_description for
an individual) that can be mapped to strings using other tables. In sql, I
would do a join to get, for example, the job_description_string for an
individual based on the number in the job_description column.

I was looking through the tutorial about 1:1 mappings, but it seemed a
little complex (i.e., the joins there are referencing objects, whereas all I
really want is a string/varchar).

>From the mailing list, it looks like the easiest way to do this would be to,
at start up time, load all of the mappings and store them in a hash. Then,
modify the object setter so that when the job_description code is set, the
number is looked up in the hash table and a job_description_string field is
set. And modify the PersistentFieldClass attribute to be
PersistentFieldPropertyImpl.

Is that the easiest way to do things? Or is there an easier way?

Thanks
Andrew



--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to