Update thread entries adding their category id