Say you overrode the getter ... if null, return default value. This
wouldn't flag the object as having been changed, so if you
commitChanges() -- without making other changes, this object wouldn't
be pushed back t the DB.
I'm not sure what the correct (as in expected) behavior would be if
the Modeler had a default value column. Should Cayenne check for NULL
and then SET the value (ensuring it is modified)? Should Cayenne just
check for NULLs in the getter and return the default value (not
modifying the object)? I just know some would expect it to work one
way and others the other way.
/dev/mrg
On Wed, Aug 20, 2008 at 5:46 AM, Øyvind Harboe <oyvind.harbo..ylin.com> wrote:
> One way to handle database NULL (replace with default value)
> is to override the CayenneDataObject get/set methods.
This archive was generated by hypermail 2.0.0 : Wed Aug 20 2008 - 12:58:34 EDT