Move transaction entry updating to database.

This will move the resposibility of updating the transaction entry when a
row is modified to the database.

Change-Id: I45f3a812ce19aa3f32bfac89b9b3e3a2a52e06d1