Fixes update bug by not modifying id of object and by calling setType in
FriendDAO.