DateConstraint : Nullable Issue
The Date Constraint is not working properly with nullable value.
This provides the two more extra options : 'Is Blank' and 'Is Filled'. If I understand correctly, 'Is Blank' option is for null values & Is Filled is for non-null values. When I try to apply 'Is Blank' - the filter works correctly to identify the null values. But when I try is 'Is Filled' - the filter does not work.
I logged the query and saw the query being run :
The bindings are
I check that the bindings value is string (blank value, i.e., ''). I tried to run this with my mysql server (frontend phpmyadmin), I tried with ? replaced by '', i.e.,
and it throws an error
So, I tried to run the query without the last part, i.e.,
and it runs correctly.
I guess the nullable() method is trying to get either NULL values or blank strings. However, for DATETIME values it can't take a blank string value. Probably I will need to write a new Operator to overcome this.
Any help is most appreciated.
1 Reply
Solved it by using custom operator.