Yes, it's better :D Thank's I turned on scaffold and checked my model. After that change It seems to work better. I checked my controller again and rebuild It. It's almost working properly (in my app is ok).
I don't understand this error (bottom) when / $this->Kategoria- >recursive = 3; / For example: // This is ok. $this->Kategoria->recursive = 2; $result = $this->Kategoria->findAll("id = $grup_id"); // This is bad $this->Kategoria->recursive = 3; $result = $this->Kategoria->findAll("id = $grup_id"); ------------------- error msg --------------- Notice: Trying to get property of non-object in C:\Program Files\xampp \htdocs\mcm\4\cake\libs\model\datasources\dbo_source.php on line 767 Notice: Trying to get property of non-object in C:\Program Files\xampp \htdocs\mcm\4\cake\libs\model\datasources\dbo_source.php on line 770 Notice: Trying to get property of non-object in C:\Program Files\xampp \htdocs\mcm\4\cake\libs\model\datasources\dbo_source.php on line 773 Fatal error: ConnectionManager::getDataSource - Non-existent data source in C:\Program Files\xampp\htdocs\mcm\4\cake\libs\model \connection_manager.php on line 110 ------------------------------------------------- My model <?php class Kategoria_opis extends AppModel { var $name = 'Kategoria_opis'; var $belongsTo = array('Kategorie' => array('className' => 'Kategoria', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'kategorie_id' ) ); } ?> <?php class Produkt_opis extends AppModel { var $name = 'Produkt_opis'; var $belongsTo = array('Produkt' => array('className' => 'Produkt', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'id' ) ); } ?> <?php class Kategoria extends AppModel { var $name = 'Kategoria'; var $hasMany = array('Produkty' => array('className' => 'Produkt', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'kategorie_id' ) ); var $hasOne = array('Kategoria_opis' => array('className' => 'Kategoria_opis', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'kategorie_id' ), 'Zdjecia' => array('className' => 'Zdjecie', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'zd_id' ) ); } ?> <?php class Zdjecie extends AppModel { var $name = 'Zdjecie'; var $primaryKey = 'zd_id'; var $hasMany = array('Produkty' => array('className' => 'Produkt', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'zdjecie_id' ), 'Kategorie' => array('className' => 'Kategoria', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'zdjecie_id' ) ); } ?> <?php class Produkt extends AppModel { var $name = 'Produkt'; var $hasOne = array('Produkty_opis' => array('className' => 'Produkt_opis', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'produkty_id' ) ); var $belongsTo = array('Kategorie' => array('className' => 'Kategoria', 'conditions' => '', 'order' => '', 'dependent' => true, 'foreignKey' => 'kategorie_id' ), 'Zdjecia' => array('className' => 'Zdjecie', 'conditions' => '', 'order' => '', 'dependent' => false, 'foreignKey' => 'zdjecie_id' ) ); } ?> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---