Answers for "flask sqlalchemy. commit does not save changes"

SQL
0

flask sqlalchemy. commit does not save changes

#When updating a JSON(B) attribute I 
#think you might need to flag it as modified
from sqlalchemy.orm.attributes import flag_modified

custObj.contextjason = { 'foo':'bar', 'so':'be it'}
flag_modified(custObj, "contextjason")
db.session.commit()
Posted by: Guest on May-14-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language