Skip to content

[Tests only] Add Locator#locate_many tests for non id primary keys#164

Merged
rafaelfranca merged 1 commit intorails:mainfrom
Shopify:uuid-locate-many-test
Aug 31, 2023
Merged

[Tests only] Add Locator#locate_many tests for non id primary keys#164
rafaelfranca merged 1 commit intorails:mainfrom
Shopify:uuid-locate-many-test

Conversation

@nvasilevski
Copy link
Contributor

locate_many with ignore_missing: true used to be broken due to to id: values clause being hardcoded

model_class.where(id: ids)

We changed it in #163 which made it possible to fully support non-id named primary keys in locate_many

model_class.where(model_class.primary_key => ids)

@rafaelfranca rafaelfranca merged commit 2650778 into rails:main Aug 31, 2023
@rafaelfranca rafaelfranca deleted the uuid-locate-many-test branch August 31, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants