I should also mention that when writing, if you encounter a NULL it should 
either throw an exception or ignore the write.  The null handling is most 
useful when reading to present data to the user (perhaps in a report from a 
query that isn't editable).


-----Original Message-----
From: Gentry, Michael (Contractor) [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 04, 2006 9:34 AM
To: [email protected]
Subject: RE: Null pointer exceptions and database null


Fundamentally, no.  We'd have to "fix" to-many handling though, and make the 
rules understood.  In your previous example:

foo.bar.name

Will fail in readNestedProperty() if foo->>bar is a to-many relationship.  
Cayenne only likes to-one relationships in the keypath currently.  In EOF, it 
will return an array of name objects for you (which can be very useful at 
times).  Likewise, when writing, it would assign the same value to all of the 
names.  More powerful, but the rules should be well understood (aka, 
documented).

/dev/mrg


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Øyvind Harboe
Sent: Friday, August 04, 2006 9:23 AM
To: [email protected]
Subject: Re: Null pointer exceptions and database null


> PS. There isn't a writeNestedProperty() though ...

Is there a fundamental reason why Cayenne couldn't handle this?

CayenneDataObject could implement some suitable semantics when it
represented a database null object.


-- 
Øyvind Harboe
http://www.zylin.com

Reply via email to