lucid icon indicating copy to clipboard operation
lucid copied to clipboard

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

Open aadamcik opened this issue 1 year ago • 0 comments

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

aadamcik avatar Mar 19 '24 15:03 aadamcik