Al final he mejorado la query de esta forma:
$qPE = 'Select id_edi from tbl_pla_edi where activo = :true and
id_pla = :id_pla';
$q = Doctrine_Query::create()
->from('Edificio e')
->where(
'(e.id_raz = :id_raz) AND '.
'(e.id_pre_edi IS NULL OR '.
'(e.id_pre_edi IN ('.$qPE.') and e.unico = :false) OR '.
'(e.id_pre_edi NOT IN ('.$qPE.') and e.unico = :true)) AND '.
'(e.id_pre_tec IS NULL OR '.
'(e.id_pre_tec IN (Select id_tec from tbl_usu_tec where id_usu
= :id_usu and activo = :true)))',
array(
':true' => true,
':false' => false,
':id_raz' => $id_raz,
':id_pla' => $id_pla,
':id_usu' => $id_usu
)
);
¿Cómo montáis las consultas complejas vosotros?
Saludos.