v3.0.5: Adds entity deletion pre-check
Adds a mechanism to determine if an entity can be safely deleted without causing a foreign key constraint violation. This is achieved by attempting a low-level delete within a transaction and rolling back if a ForeignKeyConstraintViolationException is caught. This allows the application to handle potential deletion issues gracefully.