All pastes #362597 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-18 22:50 UTC
rendered paste body
<?php
/*
Class automatically generated. ANY CHANGES WILL BE LOST!
*/
class BaseAffiliatesHostnameXref extends sfPropelCompatRecord
{
  const DATABASE_NAME = 'affiliates';

  
  public function setTableDefinition()
  {
    $this->setTableName('affiliates_hostname_xref');

    $this->hasColumn('affiliate_id', 'integer', 11, array (  'notnull' => true,));
    $this->hasColumn('name', 'string', 255, array (  'unique' => true,  'notnull' => true,));
    $this->hasColumn('created_at', 'timestamp', null, array ());
    $this->hasColumn('updated_at', 'timestamp', null, array ());
  }
  

  
  public function setUp()
  {
    $this->hasOne('Affiliates as Affiliates', 'AffiliatesHostnameXref.affiliate_id', 'id');
    $this->ownsMany('HostnameServicecallXmlXref as HostnameServicecallXmlXrefs', 'HostnameServicecallXmlXref.hostname_id');
  }
  
}
?>

---

<?php
/*

*/
class AffiliatesHostnameXrefTable extends Doctrine_Table
{
    public function getQueryFindAllWithAffiliates()
    {
//        return $this->createQuery()->from( $this->options[ 'name' ] . '.Affiliates' );
        return $this->createQuery()->leftJoin( $this->getComponentName() . '.Affiliates' );
    }

    public function findAllWithAffiliates()
    {
        return $this->getQueryFindAllWithAffiliates()->execute();
    }
}

?>