JWT-OSS/sfJwtPhpUnitPlugin — Issue #30: Concrete Inheritance breaks `flushDatabase()`.
Author: todofixthis
Created: 2011-10-23 17:30:35+00:00
State: open
Labels: defect

When `Test_Case->flushDatabase()` runs after the first test, attempting to delete all records in a table that has concrete inheritance, it fails with a SQL error.

Consider the following schema.yml file:

AclRequester:
...

AclUser:
inheritance:
type: concrete
extends: AclRequester

When `Test_Case->flushDatabase()` tries to execute `$table->delete()->execute()` on `AclUser`, the following error results:

Doctrine_Connection_Mysql_Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN acl_requester p2 ON p.id = p2.id' at line 1. Failing Query: "DELETE FROM acl_user LEFT JOIN acl_requester p2 ON p.id = p2.id"

This might just be a problem with Doctrine 1.2, but we should probably handle this case.