I have an import routine that needs to be run periodically to mass-import categories.
It processes a tree like structure of category data, and creates any categories that don't exist. The difficulty I face is that because flat catalog is enabled on the store, even after the category is created, it thinks it isn't as the index is set to manual.
I read to use the following when retrieving the category collection, to ensure the flat catalog is not used:
$categories = Mage::getModel('catalog/category', array('disable_flat' => true))
->getCollection();
However, I can see that the returned resource is still a flat catalogue one - and my import again fails (it works if I disable the flat catalog in the admin area).
What can I do to resolve this issue?