From 8d62e6744c984f93712be1e811687826d9f0bad4 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Mon, 29 Apr 2019 19:15:02 -0600 Subject: [PATCH] fix(BaseEntity): Add better null value handling from the database --- models/BaseEntity.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/BaseEntity.cfc b/models/BaseEntity.cfc index 9b116ff4..f13a0044 100644 --- a/models/BaseEntity.cfc +++ b/models/BaseEntity.cfc @@ -127,8 +127,8 @@ component accessors="true" { } attrs.each( function( key, value ) { - variables._data[ retrieveColumnForAlias( key ) ] = value; - variables[ retrieveAliasForColumn( key ) ] = value; + variables._data[ retrieveColumnForAlias( key ) ] = isNull( value ) ? javacast( "null", "" ) : value; + variables[ retrieveAliasForColumn( key ) ] = isNull( value ) ? javacast( "null", "" ) : value; } ); return this;