db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject PersistentField Problems
Date Thu, 03 Jul 2003 16:29:48 GMT
Are there any plans or thoughts on changing the PersistentField 
mechanism to be on a per-class basis?

I ask because I need to access some classes (and different fields 
within those classes, but am willing to forego that one and make people 
do it all one way or the other on a per-class basis at least) using the 
default (private field), and some via BeanUtils access to DynaBean 
properties (which isn't possible right now under any of the 
PersistentField implementations) and yet more under standard JavaBean 

I am thinking of writing a staged PersistentField implementation that 
attempts to use default access, then goes to a BeanUtils based 
retrieval (which will grab JavaBeans properties or DynaBean 
properties). This feels a lot like a hack (especially if you cache the 
results of what worked for what class type to avoid the switch on the 
exception that will get thrown (ick)) because what it is really doing 
is tracking on a per-class basis how it needs to get the properties. 
The "right" feeling way to do it is to allow specification for the 
class instead of for the entirety of OJB in the OJB.properties.


View raw message