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:michael_gentr..anniemae.com]
Sent: Friday, August 04, 2006 9:34 AM
To: cayenne-use..ncubator.apache.org
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: oyvindharbo..mail.com [mailto:oyvindharboe@gmail.com] On Behalf Of yvind Harboe
Sent: Friday, August 04, 2006 9:23 AM
To: cayenne-use..ncubator.apache.org
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
This archive was generated by hypermail 2.0.0 : Fri Aug 04 2006 - 09:40:46 EDT