Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json filters array_starts_with and array_ends_with don't work on MariaDB #8874

Closed
Tracked by #8628
Weakky opened this issue Aug 23, 2021 · 0 comments · Fixed by prisma/prisma-engines#2182
Closed
Tracked by #8628
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: filterJson topic: mariadb

Comments

@Weakky
Copy link
Member

Weakky commented Aug 23, 2021

Bug description

CAST(? AS JSON) is not supported by MariaDB. We need to find a way that works both on MySQL and MariaDB

How to reproduce

  1. Spin up a MariaDB instance
  2. Create a query that involves array_ends_with or array_starts_with
  3. Notice the error

Expected behavior

Filter should work just like on MySQL 5.7/8

Prisma information

model Test {
  id   Int  @id
  json Json
}

Environment & setup

  • OS: Mac OS
  • Database: MariaDB

Prisma Version

latest QE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: filterJson topic: mariadb
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants