Orkut Gmail Agenda Docs Web mais »
Grupos visitados recentemente | Ajuda | Acessar
Página inicial dos Grupos do Google
Mensagem sobre o tópico paginação n:n

Visualizar analisado - Mostrar apenas o texto da mensagem ??

MIME-Version: 1.0
Received: by 10.100.142.4 with SMTP id p4mr249327and.23.1246128372838; Sat, 27 
	Jun 2009 11:46:12 -0700 (PDT)
Date: Sat, 27 Jun 2009 11:46:12 -0700 (PDT)
In-Reply-To: <48f962b8-5480-4a52-ad67-71b0eb782569@p23g2000vbl.googlegroups.com>
X-IP: 201.81.83.141
References: <48f962b8-5480-4a52-ad67-71b0eb782569@p23g2000vbl.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) 
	Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Message-ID: <eb1fdf96-2e9c-4743-9c91-52f816fbb99a@l31g2000yqb.googlegroups.com>
Subject: =?ISO-8859-1?B?UmU6IHBhZ2luYefjbyBuOm4=?=
From: Altieres <altiereslo...@gmail.com>
To: =?ISO-8859-1?Q?Cake_PHP_Portugu=EAs?= <cake-php-pt@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Nic=E1ssio,

Pelo que entendi voc=EA est=E1 fazendo find na tabela Agenda.
Se voc=EA est=E1 fazendo buscas por telefones, seus finds deviam ser na
model Telefone. Acredito que devia ser a action index da controller
Telefones.

De qualquer forma, voc=EA pode tentar mudar a model que o paginator est=E1
usando, para a Telefone, da seguinte maneira:

$this->paginate('Telefone');

Se precisar exibir dados da agenda, fa=E7a um Telefone belongsTo Agenda
e recupere os dados necess=E1rios...

att,

---
Altieres Lopes
WebGoal.com.br
Simplificando Softwares

On 23 jun, 22:27, Nic=E1ssio Meneguci <nicassio.meneg...@gmail.com>
wrote:
> Estou com um problema para fazer uma paginacao aplicando um filtro na
> tabela telefones, no campo telefone
>
> quando uso o m=E9todo paginator, ele me retorna um erro dizendo que nao
> encontrou o campo, e mostra o select, nele eu reparei que nao faz o o
> left join na tabela telefones, somente na tabela agendas_telefones, eu
> ja consegui fazer o relacionamento entre elas, pra me mostrar os
> dados, mas quando uso o paginator
> com a condica=E7=E3o n=E3o est=E1 dando certo.
> alguem poderia me ajudar
> segue a estrutura das tabelas:
> obrigado
> CREATE TABLE IF NOT EXISTS `agendas` (
> =A0 `id` int(11) NOT NULL AUTO_INCREMENT,
> =A0 `agenda` varchar(60) NOT NULL,
> =A0 `prioridade` int(11) NOT NULL DEFAULT '0',
> =A0 `agendanatureza_id` int(11) NOT NULL,
> =A0 PRIMARY KEY (`id`)
> ) ENGINE=3DMyISAM =A0DEFAULT CHARSET=3Dlatin1 ROW_FORMAT=3DDYNAMIC
> AUTO_INCREMENT=3D3 ;
> INSERT INTO `agendas` (`id`, `agenda`, `prioridade`,
> `agendanatureza_id`) VALUES
> (1, 'Loja de Armas do Beto', 1, 1),
> (2, 'Cristal', 3, 2);
>
> CREATE TABLE IF NOT EXISTS `agendas_telefones` (
> =A0 `agendas_id` int(11) NOT NULL,
> =A0 `telefones_id` int(11) NOT NULL,
> =A0 PRIMARY KEY (`agendas_id`,`telefones_id`)
> ) ENGINE=3DMyISAM DEFAULT CHARSET=3Dlatin1;
> INSERT INTO `agendas_telefones` (`agendas_id`, `telefones_id`) VALUES
> (1, 1),
> (1, 2),
> (2, 1),
> (2, 2);
> CREATE TABLE IF NOT EXISTS `telefones` (
> =A0 `id` int(11) NOT NULL AUTO_INCREMENT,
> =A0 `telefone` varchar(13) NOT NULL,
> =A0 PRIMARY KEY (`id`)
> ) ENGINE=3DMyISAM =A0DEFAULT CHARSET=3Dlatin1 AUTO_INCREMENT=3D3 ;
> INSERT INTO `telefones` (`id`, `telefone`) VALUES
> (1, 'aaaaaaaaaaaaa'),

Criar um grupo - Grupos do Google - Página inicial do Google - Termos de Uso - Política de Privacidade
©2009 Google