Dosu LogoDosu Logo
Ask
Join our Discord
StrapiPublic
Strapi
DocumentsStrapi
get-where-removed
get-where-removed
Type
External
Status
Published
Created
Mar 5, 2026
Updated
Jun 29, 2026
Updated by
Dosu Bot
Source
View

import Intro from '/docs/snippets/breaking-change-page-intro.md'
import MigrationIntro from '/docs/snippets/breaking-change-page-migration-intro.md'

The getWhere() method for permission provider instances has been removed#

The getWhere() method for permission provider instances has been removed in Strapi 5; use provider.values().filter() with a custom predicate instead to query and match provider items.

In Strapi 5, the getWhere() method for permission provider instances has been removed, and users should first get the provider values, then filter them.

Breaking change description#

In Strapi v4

Provider instances (action provider, condition provider, etc…) are built using a provider factory.

Those providers have a getWhere method allowing you to query provider’s items that match certain conditions and return them.

The query was an object where keys and values were matched with the provider entries:

const values = provider.getWhere({ foo: 42, bar: 'baz' });

In Strapi 5

You need to adopt a more conventional approach by first getting the provider values, then filtering them using a custom predicate:

const values = provider.values().filter(value => value.foo === 42 && value.bar === 'baz');

Migration#


Manual procedure#

Users need to manually update their code if using the getWhere() method, using the following example as a guide:

In Strapi v4

const values = provider.getWhere({ foo: 42, bar: 'baz' });

In Strapi 5

const values = provider.values().filter(
  value => value.foo === 42 && value.bar === 'baz'
);
Documents
Admin Modal Management
Admin Panel Locale Management
admin-panel
faq
setting-up-admin-panel
Admin User Management
Blocks Editor
Clone Sanitizer Field Permissions
CodeMirror Integration
Content API Input Validation
breaking-changes
populate-select
rest
status
Content Manager Homepage
admin-panel
faq
quick-start
rest
Content Manager i18n Preview
Content Manager Layout Synchronization
Content Manager Preview
Content Manager URL & Filter State
Content Type Builder
admin-panel-api
controllers
create-components-for-plugins
populate-creator-fields
quick-start
store-and-access-data
Custom Field Prop Spreading
Date Field Serialization
Discard-Drafts Migration
Document ID Migration
breaking-changes
Draft & Publish Relation Synchronization
do-not-update-repeatable-components-with-document-service-api
document-service
lifecycle-hooks-document-service
populate
publishedat-always-set-when-dandp-disabled
relations
rest
DynamicZone Stability
components-and-dynamic-zones-do-not-return-id
components-dynamic-zones
no-shared-population-strategy-components-dynamic-zones
Edit View Layout Configuration
admin-panel
admin-panel-api
edit-view-layout-and-list-view-layout-rewritten
EnumerationInput Component
GraphQL Context Propagation
breaking-changes
document-service
draft-and-publish
graphql
i18n Locale Validation
breaking-changes
locale
i18n Locale-Scoped Operations
database-columns
document
document-service
draft-and-publish
i18n-content-manager-locale
locale
locale
locale
no-locale-all
parameters
populate
relations
rest
Monorepo Module Resolution
create-a-plugin
Nested Relation Modal Navigation
Polymorphic Relations
faq
Relation Field Validation
Relation Modal State Management
relations
Sharp Image Processing
media-library
Strapi Package Version Management
Strapi Project Scaffolding
create-a-plugin
How can I create my first Strapi project on a brand new MacBook with no prior coding experience, including all necessary terminal commands and setup steps?
quick-start
Strapi v5 Plugin API
admin-panel-rbac-store-updated
admin-permissions-for-plugins
breaking-changes
controllers
extension
faq
get-where-removed
helper-plugin
helper-plugin-deprecated
inject-content-manager-component
introduction
introduction-and-faq
model-config-path-uses-uid
pass-data-from-server-to-admin
plugins-migration
rbac
redux-content-manager-app-state
step-by-step
strapi-imports
Users-Permissions Plugin i18n
users-permissions
Vite Build Configuration
admin-panel
introduction-and-faq
vite
webpack-aliases-removed
Zod Schema Validation
document-service
Content Manager Mobile and Tablet UI Improvements
FilesManager API Reference
Focal Point Picker in Strapi Media Library
Nested Route File Structure for Strapi Plugins
Plugin-Specific Handling in the Strapi JavaScript Client
Strapi SDK Initialization and Architecture Guide
access-cast-environment-variables
access-configuration-values
adding-support-to-existing-project
admin-panel-customization
advanced-policies
advanced-queries
amazon-s3
api
api-tokens
attributes-and-content-types-names-reserved
audit-logs
auth-zero
authentication
aws-cognito
backend-customization
bulk-operations
bundlers
cas
cli
cli
client
cloudinary
community
configurations
configure-sso
content-api
content-history
content-manager
content-manager-apis
content-type-builder
core-service-methods-use-document-service
cron
crud
custom-fields
customization
data-management
database
database-identifiers-shortened
database-migrations
database-transactions
default-index-removed
default-input-validation
deployment
design-system
developing-plugins
development
discord
discord
docker
documentation
documents-and-entries
email
email-custom-providers
email-nodemailer
entity-service
entity-service-deprecated
environment
error-handling
examples
facebook
favicon
features
fetch
fields
filter
filtering
filters
filters
from-entity-service-to-document-service
functions
github
github
google
google
graphql
graphql-api-updated
guides
homepage
host-port-path
instagram
installation
installing-plugins-via-marketplace
interactive-query-builder
internationalization
intro
intro
is-supported-image-removed
keycloak
keycloak
koa-body-v6
license-only
linkedin
local-upload
locales-translations
logos
mailgun-provider-variables
media-library-providers
microsoft
middlewares
middlewares
middlewares
middlewares
models
mysql5-unsupported
new-provider-guide
new-response-format
no-find-page-in-document-service
no-upload-at-entry-creation
okta
only-better-sqlite3-for-sqlite
only-mysql2-package-for-mysql
openapi
order-pagination
order-pagination
patreon
plugin-sdk
plugin-structure
plugins
plugins-extension
policies
policies
populate
populating
preview
project-structure
publication-state-removed
query-engine
rbac
react-router-dom-6
reddit
register-allowed-fields
releases
remove-webhook-populate-relations
removed-support-for-some-env-options
requests-responses
review-workflows
routes
routes
sentry
server
server-api
server-default-log-level
server-proxy
services
services-and-controllers
setup-deployment
single-operations
sort-by-id
sort-pagination
sort-pagination
sso
status
strapi-container
strapi-utils-refactored
strict-requirements-config-files
templates
templates
testing
theme-extension
twitch
twitter
typescript
typescript
understanding-populate
upgrade-to-apollov4
upgrade-tool
upgrades
upload
usage-information
use-document-id
users-and-permissions-providers
vk
webhooks
wysiwyg-editor
yarn-not-default