Hi,
I have a class with the following:
private String dbName;
private int dbTitle;
private Name name;
and I want to do this
name = new Name( Title.fromDbId( dbTitle ), dbName );
When reading the object from the database, I can use a RowReader to do the
translation. If I want to write the object, I believe I can only do it by
implementing the interface PersistenceBrokerAware, and the function
beforeStore(), to do the reverse mapping there.
The Advanced O/R mapping tutorial doesn't mention a RowWriter. Is there one?
If not, is there any difference in implementing the function afterLookup()
instead of using a RowReader? I prefer to use the interface only, because that
way the auxiliar mapping code is all in one place.
Maybe there's even an easier way to do this. What do you think is the best
way to do it?
Cheers,
David
--
To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>
