I'm developing a module in Drupal 8, and because it handles quite a few relations between entities, I always need to add a bit of test data before being able to test the forms for the actual entity I'm working on after a uninstall/reinstall of the module. During install I can add this data in the module.install->xx_install hook. But during uninstall I get the error
"The following reasons prevent the modules from being uninstalled: There is content for the entity type..."
I tried implementing the uninstall hook and truncate the table there, but it seems the check for existing content is done before this hook runs. How can I truncate the necessary tables without having to do it manually? Having to do it manually slows down development quite a bit. Alternatively, is there a way to speed up development of the entity forms and relations so that I don't always have to install/uninstall the module to see changes?