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

If value is DateTime in newUpIfMissing, duplicate rows are created even if the value is the same #1018

Closed
adamcikado opened this issue Mar 19, 2024 · 0 comments · Fixed by #991

Comments

@adamcikado
Copy link
Contributor

Package version

20.4.0

Describe the bug

Methods updateOrCreateMany, fetchOrCreateMany and fetchOrNewUpMany use newUpIfMissing function, where it does not compare DateTime values correctly and therefore creates duplicate rows.

https://github.com/adonisjs/lucid/blob/develop/src/orm/base_model/index.ts#L212

Reproduction repo

No response

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 a pull request may close this issue.

1 participant