I think now that it is the self reference that causes the issue. After some
investigation i found a coded workaround that avoids db-drop.

class PwCatsubPeer extends BasePwCatsubPeer
{

    /**
       * HACK for mysql foreign key checks
       */
    static public function doDeleteAll( $con = null )
    {
        if ($con === null) {
            $con = Propel::getConnection(PwCatsubPeer::DATABASE_NAME,
Propel::CONNECTION_WRITE);
        }
        $statement = $con->prepare('SET FOREIGN_KEY_CHECKS = 0;');
$statement->execute();
        $afect = parent::doDeleteAll( $con ) ;
        $statement = $con->prepare('SET FOREIGN_KEY_CHECKS = 1;');
$statement->execute();
        return $afect ;
    }

}


This could be imported to symphony or propel after a check for self-refenced
foreignKeys on a table.
Vasilis

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to