Closed homestar9 closed 1 year ago
This issue has been mentioned on Ortus Solutions Community. There might be relevant details there:
https://community.ortussolutions.com/t/quick-7-undocumented-breaking-change-from-6-to-7/9731/1
This was intentional, and was actually fixed in 7.0.1 as a bug fix. The new behavior is the desired behavior since a NULL
value does not necessarily mean false
. It could mean not set yet. If you want a default value, you should be able to set default="false"
on the property.
I discovered a breaking change from Quick 6 that I didn't see covered in the docs that might be worth adding. When dealing with casts when the database has null values. I created a little test using
BooleanCast@quick
as an example.If you have your entity set up like this:
Return an entity with a null database value in the
active
field.Quick 5 will output:
Quick 6 will output:
Quick 7 will output:
The same is true for new (unpersisted) entities as well: Quick 5 and 6:
Quick 7:
I don't know what the proper behavior is, but it's a notable difference people upgrading might want to know about. Personally, I preferred the old behavior where a null value was cast to
false
. Either way, updating to Quick 7 caused many of my tests to fail.