Author: sb Date: Tue Jan 22 11:00:38 2008 New Revision: 7228 Log: - Clean up database entries for sub-workflows.
Modified: trunk/WorkflowDatabaseTiein/src/execution.php Modified: trunk/WorkflowDatabaseTiein/src/execution.php ============================================================================== --- trunk/WorkflowDatabaseTiein/src/execution.php [iso-8859-1] (original) +++ trunk/WorkflowDatabaseTiein/src/execution.php [iso-8859-1] Tue Jan 22 11:00:38 2008 @@ -162,9 +162,19 @@ protected function cleanupTable( $tableName ) { $query = $this->db->createDeleteQuery(); - - $query->deleteFrom( $tableName ) - ->where( $query->expr->eq( 'execution_id', $query->bindValue( (int)$this->id ) ) ); + $query->deleteFrom( $tableName ); + + $id = $query->expr->eq( 'execution_id', $query->bindValue( (int)$this->id ) ); + + if ( $tableName == 'execution' ) + { + $parent = $query->expr->eq( 'execution_parent', $query->bindValue( (int)$this->id ) ); + $query->where( $query->expr->lOr( $id, $parent ) ); + } + else + { + $query->where( $id ); + } $statement = $query->prepare(); $statement->execute(); -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components