public function Delete($obj)
	{
		$objectclass = get_class($obj);

		if (!$obj->OnBeforeDelete())
		{
			$this->Observe("Delete was cancelled because OnBeforeDelete did not return true");
			return 0;
		}

		$fms = $this->GetFieldMaps($objectclass);

		$pk = $obj->GetPrimaryKeyName();
		$id = $obj->$pk;
		$table = $fms[$pk]->TableName;
		$pkcol = $fms[$pk]->ColumnName;

		$sql = "delete from `$table` where `$pkcol` = '" . $this->Escape($id) . "'";
		$returnval = $this->DataAdapter->Execute($sql);

		// remove from cache
		$this->DeleteCache($objectclass,$id);

		$obj->OnDelete(); // fire OnDelete event

		return $returnval;

	}
public function Delete($obj)
	{
		$objectclass = get_class($obj);

		if (!$obj->OnBeforeDelete())
		{
			$this->Observe("Delete was cancelled because OnBeforeDelete did not return true");
			return 0;
		}

		$fms = $this->GetFieldMaps($objectclass);

		$pk = $obj->GetPrimaryKeyName();
		$id = $obj->$pk;
		$table = $fms[$pk]->TableName;
		$pkcol = $fms[$pk]->ColumnName;

		$sql = "delete from `$table` where `$pkcol` = '" . $this->Escape($id) . "'";
		$returnval = $this->DataAdapter->Execute($sql);

		// remove from cache
		$this->DeleteCache($objectclass,$id);

		$obj->OnDelete(); // fire OnDelete event

		return $returnval;

	}
public function Delete ( $ obj ) { $ objectclass = get_class ( $ obj ) ; if ( ! $ obj -> OnBeforeDelete ( ) ) { $ this -> Observe ( "Delete was cancelled because OnBeforeDelete did not return true" ) ; return 0 ; } $ fms = $ this -> GetFieldMaps ( $ objectclass ) ; $ pk = $ obj -> GetPrimaryKeyName ( ) ; $ id = $ obj -> $ pk ; $ table = $ fms [ $ pk ] -> TableName ; $ pkcol = $ fms [ $ pk ] -> ColumnName ; $ sql = "delete from `$table` where `$pkcol` = '" . $ this -> Escape ( $ id ) . "'" ; $ returnval = $ this -> DataAdapter -> Execute ( $ sql ) ; // remove from cache
 $ this -> DeleteCache ( $ objectclass , $ id ) ; $ obj -> OnDelete ( ) ; // fire OnDelete event
 return $ returnval ; }
Delete the given object from the data store

@access public
@param Object $obj the object to delete
Delete the given object from the data store