Skip to content
This repository was archived by the owner on Sep 27, 2022. It is now read-only.
This repository was archived by the owner on Sep 27, 2022. It is now read-only.

Caused by PG::UndefinedColumn: ERROR: column "owner_id" does not exist #65

@w3villa-amit

Description

@w3villa-amit

Using the fuzzily gem and getting this error ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "owner_id" does not exist
LINE 1: SELECT owner_id, owner_type, count() AS matches, MAX(score...
^
: SELECT owner_id, owner_type, count(
) AS matches, MAX(score) AS score FROM "trigrams" WHERE "trigrams"."owner_type" = $1 AND "trigrams"."fuzzy_field" = $2 AND "trigrams"."trigram" IN ($3, $4, $5) GROUP BY owner_id, owner_type ORDER BY matches DESC, score ASC LIMIT $6 OFFSET $7
from /home/amit/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `async_exec_params'
Caused by PG::UndefinedColumn: ERROR: column "owner_id" does not exist
LINE 1: SELECT owner_id, owner_type, count(*) AS matches, MAX(score...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions