hi peoples,

i have two models is cakephp:


class Pessoa extends AppModel {
    var $name = 'Pessoa';
    var $primaryKey = 'codigo';

    var $hasAndBelongsToMany = array(
        'Areainteresse' =>
            array(
                'className'            => 'Areainteresse',
                'joinTable'              => 'areainteressepessoa',
                'foreignKey'             => 'codigopessoa',
                'associationForeignKey'  => 'codigoareainteresse'
            )
        );
}


and

class Areainteresse extends AppModel {
    var $name = 'Areainteresse';
    var $useTable = 'areainteresse';
    var $primaryKey = 'codigo';
}

when i run the $this-Pessoa->find(). he return me:

array(2) {
  [0]=>
  array(12) {
    ["codigo"]=>
    int(6)
  }
  ["Areainteresse"]=>
  array(0) {
  }
}

the Pessoa entity is returned normally, however the entity Areainteresse not
returned.
This only for the find(). the save() work normally.
The data are in the table correctly.

Anyone have any solution?

---
Wladiston MaurĂ­cio de Paiva
http://wladistonpaiva.com.br
desenvolvedo...@gmail.com
e...@wladistonpaiva.com.br
+55 (31) 8435 - 5380

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to