Skip to content

A record with a bigint id can't be queried for when using PostgreSQL #36

@gyfis

Description

@gyfis

We're using our bigint record IDs in the self.scim_attributes_map, e.g.

def self.scim_attributes_map
  {
    id: :id,

...

  }
end

however, when querying for the id, since by default all attributes are queried as case insensitive, we're getting a query like

WHERE users.id ILIKE 12345

which fails on PostgreSQL, since you can't use LIKE/ILIKE on bigint columns, and id is bigint for us.

I've read the source code and see the comments about case sensitivity being tricky to use, however I can't see a way of configuring this, and the only way I see is to subclass & override either apply_scim_filter or to_activerecord_query_backend methods fully. Is that the expected way forward?

I can see Scimitar exposing a self.case_sensitive_attributes map, empty by default, which would then be used to change the queries. Should I fire a PR with that?

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