thomas4019 / expressa

API creation middleware with an admin interface
MIT License
439 stars 27 forks source link

updating _id doesnt update id column #199

Closed kane-mason closed 1 year ago

kane-mason commented 1 year ago

Not sure if this happens for all dbs, but from what i can tell on the postgres update function does not update id column when updating _id property, and im sure it should

thomas4019 commented 1 year ago

Shouldn’t we just use _id everywhere? I think I decided it made sense to try and standardize on that since that’s what MongoDB does

kane-mason commented 1 year ago

I suppose we could, but i assume there is a performance benefit retrieving the document matching the id column rather that searching for _id within the doc? Dont think it would be too hard to update id column when updating '_id' either?

kane-mason commented 1 year ago

apologies, after closer inspection, both id and _id are updated