fix HashMapper to save all data to database

As requested, this commit fixes HashMapper so that hash data should be properly saved to the database.