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
Hi, i figured out a possible misconfiguration of the 'Winter\Blog\Models\Post' featured_images relation. Postgresql reports the following error:
STATEMENT: select * from "system_files" where "system_files"."attachment_id" in (1) and "system_files"."attachment_type" = $1 and "field" = $2 order by "sort_order" asc
The IN part of the query fails cause of incompatible types (string / integer).
I made a quick test and I can commit the fix works on MySQL database.
I run into this error after migrating OctoberCMS to WinterCMS, it was interesting that on the OctoberCMS build 472 the generated statement worked fine without casting => Laravel 6.x?
@envas that's because of some changes made in Laravel 6+ where the keyType can be defined and the type of the attachment_id is technically a varchar (string) but Laravel thinks it's an integer. There was a fix for this in October 1.1.x, but I believe it was reverted because it caused some other issues. It will be fixed properly in Winter once wintercms/winter#216 gets merged though.
Hi, i figured out a possible misconfiguration of the 'Winter\Blog\Models\Post' featured_images relation. Postgresql reports the following error:
The IN part of the query fails cause of incompatible types (string / integer).
Adding a cast expression seems to fix this error:
I did not check, if this query works in mysql.
The text was updated successfully, but these errors were encountered: