[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3826: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
Next Framework • Ver Tópico - Exclusão Lógica Mestre-Detalhe

Exclusão Lógica Mestre-Detalhe

Não deixe de perguntar, solucione aqui suas dúvidas...

Exclusão Lógica Mestre-Detalhe

Mensagempor barberino » Seg Abr 16, 2012 5:05 pm

barberino
 
Mensagens: 36
Data de registro: Qua Dez 07, 2011 11:03 am

Re: Exclusão Lógica Mestre-Detalhe

Mensagempor rogelgarcia » Seg Abr 16, 2012 8:20 pm

O fetchCollection não busca o detalhe na mesma query da entidade pai. Ao invés disso é feita uma query separada.

Só que não é possível colocar condições no fetchCollection.

Você pode usar duas estratégias.

1 - Fazer o join do detalhe na query (usando join ao invés de fetchcollection) e então colocando a cláusula where.

2 - Criar outra query para buscar os detalhes e setar no mestre o resultado da query. Nessa query dos detalhes voce coloca a cláusula where do registro lógico. (recomendo)
rogelgarcia
Administrador
 
Mensagens: 674
Data de registro: Qua Jul 08, 2009 9:02 am

Re: Exclusão Lógica Mestre-Detalhe

Mensagempor barberino » Ter Abr 17, 2012 11:22 am

barberino
 
Mensagens: 36
Data de registro: Qua Dez 07, 2011 11:03 am

Re: Exclusão Lógica Mestre-Detalhe

Mensagempor barberino » Ter Abr 17, 2012 1:11 pm

barberino
 
Mensagens: 36
Data de registro: Qua Dez 07, 2011 11:03 am


Retornar para Dúvidas

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 6 visitantes

cron