I want to create a method that returns a array with the main table and the
references, im doing this way:

        public function consultaCadastro(){
                
                # main
                $qry = $this->select()->from($this, array('id_cidade',
'cidade','tab_estado.sigla'));

                
                # Join
                $qry = $qry->setIntegrityCheck(false);
                $qry = $qry->joinLeft('tab_estado','tab_estado.id_estado =
tab_cidade.id_estado', array());
                
                # return
                $rows = $qry->query()->fetchAll()
                return $rows;
        } 


But "$qry->setIntegrityCheck(false);" doesn't seem correct, and i don't like
to write de join condition. 

Is there a more elegant way to do this ? Reference map solve this ? how can
i do ?
-- 
View this message in context: 
http://www.nabble.com/Zend_db_tab-relationship-tp23137713p23137713.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to