Check out the FieldConversion interface.  You can define your own FieldConversion that 
takes the Java representation (a String) and turns it into the database representation 
(a number) when rows are saved and does the reverse when they're read in.  You then 
just register that FieldConversion using the field-descriptor's 'conversion' attribute 
for the appropriate fields.

-----Original Message-----
From: Joerg Lensing [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 3:12 AM
To: OJB Users List
Subject: mapping 


hello,
i have to map several fields which can have a limited number of values. 
e.g. "day of week" = mon,tue, wed..... Because of
performance I don't want to store them as Strings. Integers would be my 
favorit datatype. But then i have
to lookup for the meaning or the integers in my javacode. This is 
something, i don't like.

Any hints? Does OJB support a machanism for this?

joerg



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to