lucid
lucid copied to clipboard
If value is DateTime in newUpIfMissing, duplicate rows are created even if the value is the same
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