]> git.evergreen-ils.org Git - Evergreen.git/commit
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)
committerBill Erickson <berickxx@gmail.com>
Fri, 20 Feb 2015 21:20:43 +0000 (16:20 -0500)
commit14de2b0e47813e76fff1b067ccf02afbefd9df3b
tree024b3f009d1218b5425a80ff9eb6686bfc122963
parent54cd1b8c38ffab5cd48572a68b3544c88e7cd3eb
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>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm