Implement Array of hash to array of entity when doing query on Repository