You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is mostly a docs issue, but it might be nice to have an automated way of handling it. If you have a set of resources generated from some custom query in Nova, it's possible that the date column that this plugin uses might be ambiguous because it is not qualified with the table name. For example if you add the filter like this:
new DateRangeFilter('Updated', Model::UPDATED_AT),
and you have more than one table with an updated_at field in the selection, you'll get an integrity constraint exception. The workaround is simple: prefix the column name with a table qualifier when you add the filter:
new DateRangeFilter('Updated', 'posts.' . Model::UPDATED_AT),
I've not yet figured out a way to get hold of this table name automatically because we are in a static situation, but the table name for a model is dynamic, and we can't do something like self::$model->table to get hold of it.
The text was updated successfully, but these errors were encountered:
This is mostly a docs issue, but it might be nice to have an automated way of handling it. If you have a set of resources generated from some custom query in Nova, it's possible that the date column that this plugin uses might be ambiguous because it is not qualified with the table name. For example if you add the filter like this:
and you have more than one table with an
updated_at
field in the selection, you'll get an integrity constraint exception. The workaround is simple: prefix the column name with a table qualifier when you add the filter:I've not yet figured out a way to get hold of this table name automatically because we are in a static situation, but the table name for a model is dynamic, and we can't do something like
self::$model->table
to get hold of it.The text was updated successfully, but these errors were encountered: