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

date field orderBy doesn't compare different types #1144

Open
electrovir opened this issue Oct 29, 2024 · 0 comments
Open

date field orderBy doesn't compare different types #1144

electrovir opened this issue Oct 29, 2024 · 0 comments

Comments

@electrovir
Copy link

Prisma allows creating date fields with a string value or a Date instance. If a mix of Date instances and strings are used with Prismock, however, orderBy don't properly compare the two.

Repro steps:

  1. create a schema with a date field
  2. create some rows with Date instances
  3. create some rows with (ISO formatted) date strings that are earlier than the dates in part 2
  4. try a .findMany operation with orderBy
  5. notice that rows from part 3 are incorrectly ordered after the rows from part 2
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

No branches or pull requests

1 participant