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

Not In clause not working as expected #43

@vsalbaba

Description

@vsalbaba

Given posts with ids [1,2,3]
When I do
Post.where(:id.not_in => [])
I expect result to be [1,2,3].

The current generated query is
SELECT posts.* FROM posts WHERE posts.id NOT IN (NULL)

Which returns [].
So, Post where id is not in empty array returns instead of all posts .. an empty array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions