Je reçois un message d'erreur suivant lors de l'utilisation de Doctrine ORM dans Codeigniter.Erreur fatale lors de l'utilisation de gDoctirne ORM dans Codeigniter
(!) Fatal error: Call to a member function getAttribute() on a non-object in C:\xampp\htdocs\giftshoes\system\database\doctrine\Doctrine\Record.php on line 1424
Call Stack
# Time Memory Function Location
1 0.0011 327560 {main}() ..\index.php:0
2 0.720 require_once('C:\xampp\htdocs\giftshoes\system\codeigniter\CodeIgniter.php') ..\index.php:116
3 0.0492 3922368 Welcome->Welcome() ..\CodeIgniter.php:201
4 0.0817 6234096 CI_Loader->model() ..\welcome.php:14
5 0.0824 6248376 Shoes->__construct() ..\Loader.php:184
6 0.0824 6248424 Doctrine_Core::getTable() ..\Shoes.php:5
7 0.0824 6248424 Doctrine_Connection->getTable() ..\Core.php:1080
8 0.0824 6254304 Doctrine_Table->__construct() ..\Connection.php:1123
9 0.0841 6396128 Doctrine_Table->initDefinition() ..\Table.php:249
10 0.0841 6397472 Shoes->__construct() ..\Table.php:301
11 0.0841 6397680 Doctrine_Access->__set() ..\Access.php:0
12 0.0841 6397680 Doctrine_Record->set() ..\Access.php:60
------------------ Doctrine Tableau Définition -------------
abstract class BaseShoes extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('shoes');
$this->hasColumn('sku', 'integer', 11, array('primary' => true, 'autoincrement' => false));
$this->hasColumn('name', 'string', 255);
$this->hasColumn('keywords', 'string', 255);
$this->hasColumn('description', 'string');
$this->hasColumn('manufacturer', 'string', 20);
$this->hasColumn('sale_price', 'double');
$this->hasColumn('price', 'double');
$this->hasColumn('url', 'string');
$this->hasColumn('image', 'string');
$this->hasColumn('category', 'string', 50);
}
public function setUp() {
}
}
- ---------------------- Doctrine Table Code -------------------
class ShoesTable extends Doctrine_Table
{
function getAllShoes($from = 0, $total = 15)
{
$q = Doctrine_Query::create()
->from('Shoes s')
->limit($total)
->offset($from);
return $q->execute(array(), Doctrine::HYDRATE_ARRAY);
}
}
----------------- Code de modèle -----------------
class Shoes extends BaseShoes
{
function __construct() {
$this->table = Doctrine::getTable('shoes');
}
public function getAllShoes()
{
$this->table->getAllShoes();
}
}
une pente à quelle ligne est la ligne 1424 aiderait. – Danten
Le code est formaté maintenant ... 1424 est le numéro de ligne de Doctrine \ Record.php –
Oui, mais quel est le numéro de ligne exact? Postez le morceau de code qui précède immédiatement. – Danten