Beispiel #1
0
 /**
  * Returns a delete query for the given persistent object $class.
  *
  * The query is initialized to delete from the correct table and
  * it is only neccessary to set the where clause.
  *
  * Example:
  * <code>
  * $q = $session->createDeleteQuery( 'Person' );
  * $q->where( $q->expr->gt( 'age', $q->bindValue( 15 ) ) );
  * $session->deleteFromQuery( $q );
  * </code>
  *
  * Attention: If you use a query generated by this method to delete objects,
  * the internal {@link ezcPersistentIdentityMap} will be completly reset.
  * This is neccessary to avoid inconsistencies, because the session cannot
  * trace which objects are deleted by the query.
  *
  * @throws ezcPersistentObjectException
  *         if there is no such persistent class.
  *
  * @param string $class
  *
  * @return ezcQueryDelete
  */
 public function createDeleteQuery($class)
 {
     return $this->session->createDeleteQuery($class);
 }