Andriy Shapochka <ashapochk..otmail.com> wrote:
> I am wondering is there any particular reason to have the methods
> CayenneDataObject.readProperty(...), CayenneDataObject.writeProperty(...)
> declared as *protected*? This makes it very difficult to write the code
> manipulating with data object properties / to-one relationships in a
stable
> manner when those do not have the corresponding auto-generated accessor
> methods especially taking into considiration the implementation of the
> internal property resolution is changing now and then. For instance the
> dataviews relying on the old property behavior and the outdated
readProperty
> imitation have recently become broken. What would you say about making
> read/writeProperty public in CayenneDataObject? And if this is possible,
> when can this be done (I need to fix my code broken by the newer cayenne
> dist rather promptly)?
I'm probably missing something, but can't you use these DataObject methods?
public java.lang.Object readPropertyDirectly(java.lang.String propName)
public java.lang.Object readNestedProperty(java.lang.String path)
It's what I've done in my code.
However, taking a quick look, I see that those are supposedly "for internal
use only" (the only difference is that readPropertyDirectly doesn't resolve
faults).
So maybe I guess I agree with Andriy. It seems like "readPropertyDirectly"
should be made protected and "readProperty" made public, which is the
reverse of what's there now, or both left public.
This archive was generated by hypermail 2.0.0 : Sat Mar 13 2004 - 11:56:08 EST