You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Mike Jackson <mj...@cdi-hq.com> on 2004/06/30 01:15:30 UTC

Field translation

I'm trying to search via OJB using a persisted object as the mask for the
search.  I'm passing my object into a method which should generate criteria
for each of the fields with equals statements for the fields which have
values and isNull statements for the fields which are null.  But I'm trying
to do this in a generic way so that I don't have to tell the class what the
real field names in the database are (using reflection).  But the field
names in the object don't match the field names in the database and I can't
find a method anywhere to translate the object field name to the database
column name.  Can someone tell me where to find a method or if one exists?

I've tried looking in the list archives and the online documentation, but
haven't found anything.  


--mikej
-=-----
mike jackson
mjackson@cdi-hq.com




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


RE: Field translation

Posted by Mike Jackson <mj...@cdi-hq.com>.
Nevermind, found what I was looking for.

--mikej
-=-----
mike jackson
mjackson@cdi-hq.com


-----Original Message-----
From: Mike Jackson [mailto:mjackson@cdi-hq.com] 
Sent: Tuesday, June 29, 2004 4:16 PM
To: 'OJB Users List'
Subject: Field translation


I'm trying to search via OJB using a persisted object as the mask for the
search.  I'm passing my object into a method which should generate criteria
for each of the fields with equals statements for the fields which have
values and isNull statements for the fields which are null.  But I'm trying
to do this in a generic way so that I don't have to tell the class what the
real field names in the database are (using reflection).  But the field
names in the object don't match the field names in the database and I can't
find a method anywhere to translate the object field name to the database
column name.  Can someone tell me where to find a method or if one exists?

I've tried looking in the list archives and the online documentation, but
haven't found anything.  


--mikej
-=-----
mike jackson
mjackson@cdi-hq.com




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org