diff --git a/models/BaseEntity.cfc b/models/BaseEntity.cfc index c5f8736..83fb1ec 100644 --- a/models/BaseEntity.cfc +++ b/models/BaseEntity.cfc @@ -616,12 +616,11 @@ component accessors="true" { if ( !hasAttribute( key ) ) { continue; } - variables._data[ retrieveColumnForAlias( key ) ] = ( - !arguments.attributes.keyExists( key ) || isNull( arguments.attributes[ key ] ) - ) ? javacast( "null", "" ) : castValueForGetter( key, arguments.attributes[ key ] ); - variables[ retrieveAliasForColumn( key ) ] = ( - !arguments.attributes.keyExists( key ) || isNull( arguments.attributes[ key ] ) - ) ? javacast( "null", "" ) : castValueForGetter( key, arguments.attributes[ key ] ); + + var value = castValueForGetter( key, arguments.attributes[ key ] ); + + variables._data[ retrieveColumnForAlias( key ) ] = value; + variables[ retrieveAliasForColumn( key ) ] = value; } } @@ -3455,10 +3454,6 @@ component accessors="true" { return arguments.value; } - if ( !isVirtualAttribute( arguments.key ) && isNullValue( arguments.key, arguments.value ) ) { - return arguments.value; - } - var castMapping = variables._casts[ arguments.key ]; if ( !variables._casterCache.keyExists( arguments.key ) ) { variables._casterCache[ arguments.key ] = variables._wirebox.getInstance( dsl = castMapping );