should be categoryNamesByParent += (cat.name -> parent.id :: categoryNamesByParent.getOrElse(cat.name, Nil))