Maybe this is wrong. $rootCat is already an entity so why do we need to reference it's parent?
Next thought is the parent is already an association, so surely we dont need to set the parent at all. It's already already if we access the property doctrine will just fetch it I thought.