Cannot attach a record via relation manager if the record has translatable json field
I have days, days has many to many relation to exercises.
I have days relation manager and if I manually attach a record in the db it is okay.
But if I try to attach via the button, when I am searching for exercise to attach I've got:
Undefined function: 7 ERROR: could not identify an equality operator for type.
That is because the query uses distinct but one of the exercise columns are json fields, so the error occurs. Distinct cannot be used with json fields. The field is json because it is translatable. I am using spatie translatable plugin.
How you resolve this ?
2 Replies
so I assume from:
searching for exercise to attach
the error in the select menu?
can you try this:
https://filamentglow.com/trick/use-translatable-for-relations-in-select-components-1838467dI will give it a shot, thank you!
For now I am using
jsonb
which works like a charm but I am not completely aware of its pros and cons over json