Hi, I'm having a weird issue with the upsert funct...
# orm-help
j
Hi, I'm having a weird issue with the upsert function. I'm trying to create or update an entity by it's primary key, and in the update part of the upsert I only update "non special" columns (no constraints on them) Though, I still get an unique constraint error. Which probably means it tries to create a new row instead of updating the currently existing one. Am I doing something wrong here?
r
@Johannes Bolten 👋 I think the issue here is that it goes to update the record, but you have another unique constraint of
spotifyId
and
backtrackId
and that might be causing it as there might already be a record with that combination.
j
Yeah but I'm not editing either one of those fields, so how could that be an issue?
r
Could you share sample data along with your schema so that I can check?
j
oh oops read that wrong, i'm on it :)
💯 1