I want to update a row of a table.
To add I used,
session.add(unit) #here unit is unit object of class unit
session.commit()
To update I tried,
session.merge(unit)
session.commit()
However, in the database there are other columns, e.g. create_by, created_on, updated_on, which are not set in the unit object, so these are set NULL upon the merge.