Actually, this reminds me of something else I stumbled upon a LONG time
ago.  I don't have a good test case handy, so my details might be a bit
off.

If you have a Department with a to-many to Person, and Person has a
string emailAddress, Cayenne won't let you do this (or at least wouldn't
when I tried it):

List addresses =
manager.readNestedProperty("department.people.emailAddress");

Cayenne didn't want to handle that.  EOF supports it.  Is there any
reason we shouldn't be able to handle this?  (Assuming it still doesn't
handle it.)

/dev/mrg



-----Original Message-----
From: Gentry, Michael (Contractor) [mailto:[EMAIL PROTECTED]

Sent: Thursday, June 29, 2006 9:46 AM
To: [email protected]
Subject: RE: writeNestedProperty


I'd think it would be fairly easy to write this, but what do you do if
the last item in the path returns a List of objects instead of a single
object?  Apply the value to all of them or throw an exception?

/dev/mrg

-----Original Message-----
From: Andrus Adamchik [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 9:32 AM
To: [email protected]
Subject: Re: writeNestedProperty


Hi Andrew,

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)

Andrus

On Jun 29, 2006, at 1:58 PM, [EMAIL PROTECTED] wrote:

> Hello;
>
> 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.
>
> Regards;
>
> ___
> Andrew Lindesay
> www.lindesay.co.nz
>
>
>
>

Reply via email to