コード例 #1
0
	/**
	 * Delete or soft delete all records, depending on AbsenceEleveTraitementPeer::$softDelete
	 *
	 * @param			 PropelPDO $con the connection to use
	 * @return		 int	The number of affected rows (if supported by underlying database driver).
	 * @throws		 PropelException Any exceptions caught during processing will be
	 *							rethrown wrapped into a PropelException.
	 */
	public static function doDeleteAll(PropelPDO $con = null)
	{
		if (AbsenceEleveTraitementPeer::isSoftDeleteEnabled()) {
			return AbsenceEleveTraitementPeer::doSoftDeleteAll($con);
		} else {
			return AbsenceEleveTraitementPeer::doForceDeleteAll($con);
		}
	}
コード例 #2
0
	/**
	 * Bypass the soft_delete behavior and force a hard delete of the current object
	 */
	public function forceDelete(PropelPDO $con = null)
	{
		if($isSoftDeleteEnabled = AbsenceEleveTraitementPeer::isSoftDeleteEnabled()) {
			AbsenceEleveTraitementPeer::disableSoftDelete();
		}
		$this->delete($con);
		if ($isSoftDeleteEnabled) {
			AbsenceEleveTraitementPeer::enableSoftDelete();
		}
	}