P3rukao 0 Denunciar post Postado Maio 8, 2010 Daew... meu find('all') não tá funcionando. Fazendo assim ele não está funcionando, digo, não está eliminando os que têm ID = 1, 5 ou 8; Está exibindo todos... $conditions = array( 'NOT IN' => array( 'Categoriausuario.id' => array('1','5','8') ), 'order' => array( 'Categoriausuario.titulo' => 'asc' ) ); $tipousuario = $this->Categoriausuario->find('all', $conditions); Mas assim funciona: $tipousuario = $this->Categoriausuario->findAll('Categoriausuario.id NOT IN (1, 5, 8)'); Só que na nova versão do Cake (1.3) ele não aceita mais o findAll().. o que pode estar errado? Compartilhar este post Link para o post Compartilhar em outros sites
lucaswxp 22 Denunciar post Postado Maio 8, 2010 Tente mudar para: $this->Model->find('all', array('conditions' => $conditions));E, se não me engano, é apenas "NOT" não "NOT IN". Compartilhar este post Link para o post Compartilhar em outros sites
P3rukao 0 Denunciar post Postado Maio 11, 2010 Isso mesmo lucas... tava faltando o array('conditions' => ...). vlw pelo help... ;) Compartilhar este post Link para o post Compartilhar em outros sites