You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not about indexes, the problem is comparing complex PKs, that is the reason why this is disallowed, as you can't simply compare things like a.id === b.id, neither you can build a map of pk <-> entity easily.
TBH I was just lazy implementing this, the em.upsert turned to be very complex already even without that...
This would have to additionally check composite unique constraints - those live on the entity metadata (meta.uniques), not on property level. I guess it won't be that hard to support, it was just too much to do in a single run.
Describe the bug
The new
upsert()
fails if you try to upsert with a compound indexStack trace
To Reproduce
Steps to reproduce the behavior:
https://stackblitz.com/edit/mikro-orm-esm-repro-y96acp?file=basic.test.ts
Expected behavior
Generate an insert on conflict 'my_autogenerate_compound_index'
The text was updated successfully, but these errors were encountered: