gearbox-solutions / eloquent-filemaker

A Model extension and Eloquent driver for Laravel connecting to FileMaker through the Data API
https://gearboxgo.com
MIT License
54 stars 16 forks source link

Add Null Conversion #56

Closed likeadeckofcards closed 5 months ago

likeadeckofcards commented 1 year ago

By default FileMaker stores all values as an empty string. This works but causes issues with casting attributes or expected functionality in Laravel. A recent release added any cast attributes to convert to null if the value is an empty string to prevent issues with date casting. We want to do 2 things in the future:

  1. Add a defaulted setting that will allow users to turn on/off auto null conversion with the default set to off. This will preserve backwards compatibility and not introduce a major version.
  2. We want to switch the default to on to better align with data normally seen in Laravel while using other database engines.
Smef commented 5 months ago

Added in 2.0