Bonjour à tous, je débute sur symfony
j'ai une base de donnée relationnelle connecté à mon site
avec une table hardware relier a une table hwsupportlog
en relation 1.n avec une clé étrangere sur la table hwsupportlog
j'effectue une requête doctrine qui fonctionne dans hardwareTable.class.php
dans actions.class.php j'appelle la requêteCode:
1
2
3
4
5
6
7
8
9
10
11
12 public function getHardware() { $q = Doctrine_Query::create() ->from('hardware h') ->leftjoin('h.typehardwareIdTypeHardware t') ->leftjoin('h.softwareIdSoftwareCurrent s') ->leftjoin('h.hwsupportlogs r'); return $q->execute(); }
et dans indexSuccess j'ai tout les champs sauf celui de la table hwsupportlogCode:$this->hardwares = Doctrine_Core::getTable('hardware')->getHardware();
avec l'erreur suivanteCode:
1
2
3
4
5 <td><?php echo $hardware->typehardwareIdTypeHardware->getName() ?></td> <td><?php echo $hardware->typehardwareIdTypeHardware->getDescription() ?></td> <td> </td> <td><?php echo $hardware->hwsupportlogs->getHardwareIdHardware() ?></td>
je n'arrive pas à accéder a la table hwsupportlog $hardware->hwsupportlogs->getHardwareIdHardware()Code:Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Doctrine_Collection' does not have a method 'getHardwareIdHardware' in E:\wamp\bin\php\php5.3.0\PEAR\symfony\escaper\sfOutputEscaperObjectDecorator.class.php on line 64
et je n'ai trouvé aucun exemple sur le site de symfony ni de doctrine pour ce cas là.
merci pour votre aide