onConflictDoNothing is not returning values
Hey,
Given the following query:
It only returns the data when it has inserted unique row, but when row exists, it doesn't return me the existing row.
The behaviour I am seeking, is if the row exists, do not insert it, but give it back to me anyway, because I need to know the ID.
3 Replies
As a work around I implemented onConflictDoUpdate() for now. And I update the updated_at timestamp in the table.
However I dont think thats the best thing to do, if we aren't actually insert or upserting data then we shouldn't do anything
This might be a behavior from the driver itself where there is nothing drizzle can do
Because if the database is doing nothing, it might just be it's behavior to not retrurn anything
hmm ok, I am using turso driver.
I will test with something else if this still happens