Salut,

Je vois 2 possibilités soit tu essayes en passant par 
$this->Projecthist->Project->find() en mettant les conditions sur 
Projethist et Property, soit tu changes ta conditions en 
'Projet.propid'=>$id

Mehdi


Julienne Ingabire a écrit :
> voici les associations que j ai:
> dans app_controller:
>
> $this->Project->bindModel(array('belongsTo' => array(
>                     'Planstagelu' => array(
>                         'className' => 'Planstagelu',
>                         'foreignKey' => 'planstage',
>                         'conditions' => array(
>                                 'Planstagelu.lang' => $sellang,
>                                 'Planstagelu.code_type' => 41)),
>                     'Property' => array(
>                         'className' => 'Property',
>                         'foreignKey' => 'propid'))), false);
> <?php
> class Projecthist extends AppModel {
>
>     var $name = 'Projecthist';
>     var $useTable = 'PROJECT_HIST';
>     var $primaryKey = 'phid';
>    
>     var $belongsTo = array(
>         'Project' => array('className' => 'Project', 'foreignKey' => 
> 'projid')
>             );
>        
>    
>
> }
> ?>
> je sais que les associations dooivent aller dans les deux sens mais 
> meme là j ai le mme problème
> merci
>
> 2009/3/6 Mehdi AMINI <joker....@gmail.com <mailto:joker....@gmail.com>>
>
>
>     Salut,
>
>     > mon souci est que je dois fair quelque chose comme ça
>     > $this->Projecthist->find('all', array('conditions' =>
>     > 'Property.propid'=> var));
>     > mais je n arrive pas à avoir  access à Property.propid car celui ci
>     > est le sous array de Project
>
>     C'est un problème logique, regarde les requêtes générées, tu ne
>     peux pas
>     filtrer directement si plusieurs requêtes sont nécessaire pour sortir
>     Property.
>     Donne nous tes associations et on pourra mieux t'aider.
>
>
>
>     Mehdi
>
>
>
>
>
>
> -- 
> Julienne Ingabire
>
> Software-Developer
> DOCUMEDIA Schweiz GmbH
> Bahnhofstrasse 24
> CH-8803 Rüschlikon
> Phone:    +41 (44) 724 77 77
> Fax:        +41 (44) 724 78 77
> Direct:    +41 (44) 724 77 43
> Email:       julie.ingab...@gmail.com <mailto:julie.ingab...@gmail.com>
> Website:  www.docu.ch <http://www.docu.ch>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~

Groupe "Cakephp-fr".
Adresse : cakephp-fr@googlegroups.com
Pour résilier  : cakephp-fr-unsubscr...@googlegroups.com
Pour les options : http://groups.google.com/group/cakephp-fr?hl=fr
-~----------~----~----~----~------~----~------~--~---

Répondre à