First of all sorry for my English..
I want to use transactions.
I have some code
$User = new User();
$transaction = new Transaction($this->getDI(), true);
$User->setTransaction($transaction);
//User Model have a method like :
class User {
//...
public function cashPlus($amount, $userId = false)
{
$userId = ($userId == false) ? $this->id : $userId;
$query = "UPDATE {$this->getSource()} SET cash = cash + {$amount} WHERE id = {$userId}";
$this->getReadConnection()->query($query);
//There can be manipulations with other Entity, that used same transaction
}
}
If I set the transaction, will method 'getReadConnection()' use it or not?