Skip to content

Instantly share code, notes, and snippets.

@jonathaningram
Created August 31, 2012 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathaningram/3547720 to your computer and use it in GitHub Desktop.
Save jonathaningram/3547720 to your computer and use it in GitHub Desktop.
Doctrine MasterSlaveConnection beginTransaction connects to master and then calls parent method which overwrites connection
<?php
class MasterSlaveConnection
{
public function beginTransaction()
{
$this->connect('master');
return parent::beginTransaction();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment