LP#1198465 Allow null fields to stay null in to_fieldmapper()
authorDan Wells <dbw2@calvin.edu>
Wed, 3 Dec 2014 19:21:16 +0000 (14:21 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 21 Jan 2015 22:08:57 +0000 (17:08 -0500)
commit946f4e910e9450ac13ef98e1418819aa7821c790
tree9f86d762729ec8def559a7693a41f3338d686444
parentf901121f7a163c75ab87256bfb7e4551d3f4362c
LP#1198465 Allow null fields to stay null in to_fieldmapper()

In CDBI.pm, we can convert DB objects to Fieldmapper objects using
to_fieldmapper().  Part of the conversion was forcing stringification,
which does what we need for nested objects, but also converts 'nulls'
(undefineds) to 'empty' values.  This causes problems when trying to
write these Fieldmapper objects back to the DB using cstore (or the
like).

This commit simply lets undefined values stay that way, which in turn
prevents NULLs from trying to become empty strings in the DB.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm