This commit is contained in:
parent
034744caeb
commit
66dce0416d
@ -97,7 +97,7 @@ class Doctrine_Collection_Batch extends Doctrine_Collection {
|
||||
$query .= substr(str_repeat("?, ",count($a)),0,-2);
|
||||
$query .= ($c > 1)?") ORDER BY ".$pk[0]." ASC":"";
|
||||
|
||||
$stmt = $this->table->getSession()->execute($query,array_values($a));
|
||||
$stmt = $this->table->getConnection()->execute($query,array_values($a));
|
||||
|
||||
foreach($a as $k => $id) {
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
@ -110,36 +110,36 @@ class Doctrine_EventListener_Debugger extends Doctrine_EventListener {
|
||||
$this->debug[] = new Doctrine_DebugMessage($record,self::EVENT_PREEVICT);
|
||||
}
|
||||
|
||||
public function onClose(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_CLOSE);
|
||||
public function onClose(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_CLOSE);
|
||||
}
|
||||
public function onPreClose(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_PRECLOSE);
|
||||
public function onPreClose(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_PRECLOSE);
|
||||
}
|
||||
|
||||
public function onOpen(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_OPEN);
|
||||
public function onOpen(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_OPEN);
|
||||
}
|
||||
|
||||
public function onTransactionCommit(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_COMMIT);
|
||||
public function onTransactionCommit(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_COMMIT);
|
||||
}
|
||||
public function onPreTransactionCommit(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_PRECOMMIT);
|
||||
public function onPreTransactionCommit(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_PRECOMMIT);
|
||||
}
|
||||
|
||||
public function onTransactionRollback(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_ROLLBACK);
|
||||
public function onTransactionRollback(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_ROLLBACK);
|
||||
}
|
||||
public function onPreTransactionRollback(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_PREROLLBACK);
|
||||
public function onPreTransactionRollback(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_PREROLLBACK);
|
||||
}
|
||||
|
||||
public function onTransactionBegin(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_BEGIN);
|
||||
public function onTransactionBegin(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_BEGIN);
|
||||
}
|
||||
public function onPreTransactionBegin(Doctrine_Session $session) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($session,self::EVENT_PREBEGIN);
|
||||
public function onPreTransactionBegin(Doctrine_Connection $connection) {
|
||||
$this->debug[] = new Doctrine_DebugMessage($connection,self::EVENT_PREBEGIN);
|
||||
}
|
||||
|
||||
public function onCollectionDelete(Doctrine_Collection $collection) {
|
||||
|
@ -36,19 +36,19 @@ interface Doctrine_EventListener_Interface {
|
||||
|
||||
public function onWakeUp(Doctrine_Record $record);
|
||||
|
||||
public function onClose(Doctrine_Session $session);
|
||||
public function onPreClose(Doctrine_Session $session);
|
||||
public function onClose(Doctrine_Connection $connection);
|
||||
public function onPreClose(Doctrine_Connection $connection);
|
||||
|
||||
public function onOpen(Doctrine_Session $session);
|
||||
public function onOpen(Doctrine_Connection $connection);
|
||||
|
||||
public function onTransactionCommit(Doctrine_Session $session);
|
||||
public function onPreTransactionCommit(Doctrine_Session $session);
|
||||
public function onTransactionCommit(Doctrine_Connection $connection);
|
||||
public function onPreTransactionCommit(Doctrine_Connection $connection);
|
||||
|
||||
public function onTransactionRollback(Doctrine_Session $session);
|
||||
public function onPreTransactionRollback(Doctrine_Session $session);
|
||||
public function onTransactionRollback(Doctrine_Connection $connection);
|
||||
public function onPreTransactionRollback(Doctrine_Connection $connection);
|
||||
|
||||
public function onTransactionBegin(Doctrine_Session $session);
|
||||
public function onPreTransactionBegin(Doctrine_Session $session);
|
||||
public function onTransactionBegin(Doctrine_Connection $connection);
|
||||
public function onPreTransactionBegin(Doctrine_Connection $connection);
|
||||
|
||||
public function onCollectionDelete(Doctrine_Collection $collection);
|
||||
public function onPreCollectionDelete(Doctrine_Collection $collection);
|
||||
|
@ -25,12 +25,12 @@ class Doctrine_Locking_Manager_Pessimistic
|
||||
/**
|
||||
* Constructs a new locking manager object
|
||||
*
|
||||
* When the CREATE_TABLES attribute of the session on which the manager
|
||||
* When the CREATE_TABLES attribute of the connection on which the manager
|
||||
* is supposed to work on is set to true, the locking table is created.
|
||||
*
|
||||
* @param Doctrine_Session $dataSource The database session to use
|
||||
* @param Doctrine_Connection $dataSource The database connection to use
|
||||
*/
|
||||
public function __construct(Doctrine_Session $dataSource)
|
||||
public function __construct(Doctrine_Connection $dataSource)
|
||||
{
|
||||
$this->_dataSource = $dataSource;
|
||||
|
||||
|
@ -10,7 +10,7 @@ class Doctrine_Validator_Unique {
|
||||
public function validate(Doctrine_Record $record, $key, $value, $args) {
|
||||
$table = $record->getTable();
|
||||
$sql = "SELECT id FROM ".$table->getTableName()." WHERE ".$key." = ?";
|
||||
$stmt = $table->getSession()->getDBH()->prepare($sql);
|
||||
$stmt = $table->getConnection()->getDBH()->prepare($sql);
|
||||
$stmt->execute(array($value));
|
||||
return ( ! is_array($stmt->fetch()));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user