saving database id to object after saving a new row