Updating Set to HashSet required for retrieval from mongo db