Cayenne 3.0 will likely be supporting both kinds of persistent
objects throughout the stack - those that implement DataObject (i.e.
provide generic access to properties) and POJO's (or at least objects
implementing Persistent interface) that doesn't have [read|write]
(Nested)?Property. So the users will have a choice.
In this context adding writeNestedProperty makes sense for the first
category.
Regarding nulls - Cayenne is like EOF in this respect - if a null is
encountered in the path, null is immediately returned from the method.
Andrus
On Jun 30, 2006, at 2:14 AM, Michael Gentry wrote:
> I personally think writeNestedProperty() is a perfectly valid feature
> request to be added to Cayenne. If you are already using OGNL, such
> as in a Tapestry application, that is also an option. Keep in mind
> that nulls give OGNL heartburn, though. I'm not certain what Cayenne
> does with them in readNestedProperty(). (EOF's KVC will return a null
> if it encounters a null, while OGNL throws an exception -- that
> feature complicated some of my Tapestry pages.)
>
> I might have to look at this a bit more later.
>
> /dev/mrg
>
> PS. If you create a working writeNestedProperty() before we can and
> feel like sharing, please do.
>
>
>
> On 6/29/06, ap..indesay.co.nz <apl@lindesay.co.nz> wrote:
>> Hello Andrus;
>>
>> >> Can I ask if there's something like 'takeValueForKeyPath(...)'
>> >> from KVC that can be used with 'DataObject'? I was looking for a
>> >> 'writeNestedProperty', but couldn't see it.
>> ...
>> > No, unfortunately there's none. Should be easy to add via a custom
>> > wedge class sitting between CayenneDataObject and your own class
>> > (configurable in the Modeler)
>>
>> Is your thinking that it would best to get people to use something
>> like OGNL on Cayenne instead of putting this stuff into cayenne
>> itself?
>>
>> Regards;
>>
>> ___
>> Andrew Lindesay
>> www.lindesay.co.nz
>>
>>
>>
>>
>
This archive was generated by hypermail 2.0.0 : Fri Jun 30 2006 - 04:04:22 EDT