When using "many" relationships error like the following is produced:
SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: character = integer
LINE 1: select * from "files" where "files"."fileable_id" in (1, 1, ...
HINT: No operator matches the given name and argument types. You might need to add explicit type casts. (SQL: select * from "files" where "files"."fileable_id" in (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) and "files"."fileable_type" = App\\Contract and "files"."deleted_at" is null)
This can be fixed by adding the getKeyType function to the trait and setting it to string.
When using "many" relationships error like the following is produced:
This can be fixed by adding the getKeyType function to the trait and setting it to string.