title: How to generate Doctrine models/classes that extend a custom record class
body: <p>When I use Doctrine to generate classes from Yaml/db each Base class (which includes the table definition) extends the Doctrine_Record class.</p>
  
  <p>Since my app uses a master and (multiple) slave db servers I need to be able to make the Base classes extend my custom record class to force writes to go to the master db server (as described <a href="http://www.doctrine-project.org/documentation/cookbook/1_1/en/master-and-slave-connections" rel="nofollow noreferrer">here</a>).
  However if I change the base class manually I lose it again when I regenerate my classes from Yaml/db using Doctrine.</p>
  
  <p>I need to find a way of telling Doctrine to extend my own Base class, or find a different solution to a master/slave db setup using Doctrine.</p>
  
  <p>Example generated model: </p>
  
  <pre><code>abstract class My_Base_User extends Doctrine_Record
  {
  </code></pre>
  
  <p>However I need it to be automatically generated as:</p>
  
  <pre><code>abstract class My_Base_User extends My_Record
  {
  </code></pre>
  
  <p>I am using Doctrine 1.2.1 in a new Zend Framework 1.9.6 application if it makes any difference.</p>