I have been reading up on ways to do this in sqlalchemy and there seem to be many solutions, including the most common .update({...})
. However I don't want to specify which fields to update, because I simply want to overwrite the entire row that is associated with the primary key. What is a good way to do this?
One way I can think of is delete the matched row, and commit the new one. However, I'm not clear if there are any weird consequences of doing it this way, since my primary key is autogen not user defined id = Column(Integer, primary_key=True, autoincrement=True)
.