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
When I call find_each on it, I get results like this:
SELECT "models".* FROM "models" WHERE "model"."sub_id" = $1 AND (("models"."sub_id" > 'xxxxx-yyy-...') OR ("models"."sub_id" = 'xxxxx-yyy-...' AND "models"."id" > 'aaaaa-bb....')) ORDER BY "models"."sub_id" ASC, "models"."id" ASC LIMIT $4
But when calling with this library, I'd expect the same, but am getting different:
SELECT "models".* FROM "models" WHERE "models"."sub_id" = $1 AND (models.sub_id > 'xxxxx-yyy-....' OR (models.sub_id = 'xxxxx-yyy-....' AND (models.id > 'xxxxx-yyy-....','aaaaa-bb.....'))) ORDER BY models.sub_id,models.id LIMIT $4
ActiveRecord::StatementInvalid: PG::DatatypeMismatch: ERROR: argument of AND must be type boolean, not type record
LINE 1: ...y_id = 'xxxxx-yyy....' AND (company_f...
And it's due to the fact that (models.id > 'xxxxx-yyy-....','aaaaa-bb.....') should just be using aaaaa-bb... instead of the whole thing.
I've checked the docs, and previous tickets, but not seeing this come up.
Hello.
I have the following model:
When I call
find_each
on it, I get results like this:But when calling with this library, I'd expect the same, but am getting different:
results in
And it's due to the fact that
(models.id > 'xxxxx-yyy-....','aaaaa-bb.....')
should just be usingaaaaa-bb...
instead of the whole thing.I've checked the docs, and previous tickets, but not seeing this come up.
Relevant PR #365
The text was updated successfully, but these errors were encountered: