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'); } } ?> --- createQuery()->from( $this->options[ 'name' ] . '.Affiliates' ); return $this->createQuery()->leftJoin( $this->getComponentName() . '.Affiliates' ); } public function findAllWithAffiliates() { return $this->getQueryFindAllWithAffiliates()->execute(); } } ?>