Hi,
i'm using cakephp 1.2.x.x
i did cake bake to build all my Model View and Controller
here is my model :
<?php
class NewsMain extends AppModel {
var $name = 'NewsMain';
var $useTable = 'news_main';
var $validate = array(
'title' => VALID_NOT_EMPTY,
'url' => VALID_NOT_EMPTY,
'date' => VALID_NOT_EMPTY,
'status' => VALID_NOT_EMPTY,
'tid' => VALID_NOT_EMPTY,
'pid' => VALID_NOT_EMPTY,
);
//The Associations below have been created with all possible keys,
those that are not needed can be removed
var $belongsTo = array(
'NewsCat' => array('className' => 'Ne<?php
class NewsMain extends AppModel {
public $name = 'NewsMain';
public $useTable = 'news_main';
public $validate = array(
'title' => VALID_NOT_EMPTY,
'url' => VALID_NOT_EMPTY,
'date' => VALID_NOT_EMPTY,
'status' => VALID_NOT_EMPTY,
'tid' => VALID_NOT_EMPTY,
'pid' => VALID_NOT_EMPTY,
);
//The Associations below have been created with all possible keys,
those that are not needed can be removed
public $belongsTo = array(
'NewsCat' => array('className' => 'NewsCat',
'foreignKey' =>
'cat_id',
'conditions' =>
'',
'fields' => '',
'order' => '',
'counterCache'
=> ''),
);
public $hasMany = array(
'NewsVote' => array('className' => 'NewsVote',
'foreignKey' =>
'id_news',
'conditions' =>
'',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'dependent' =>
'',
'exclusive' =>
'',
'finderQuery'
=> '',
'counterQuery'
=> ''),
);
}
?>
and the Controller :
<?php
class NewsMainsController extends AppController {
public $name = 'NewsMains';
public $helpers = array('Html', 'Form' );
public function index() {
$this->NewsMain->recursive = 0;
$this->set('newsMains', $this->paginate());
}
[...]
}?>
and as soon as i want to add a __construct() in the
app_controller.php i get the error i posted.
<?php
/* SVN FILE: $Id: app_controller.php 5118 2007-05-18 17:19:53Z phpnut
$ */
[...]
class AppController extends Controller {
public function __construct() {
}
}
?>
ps : i saw an old message here with the exactly same Undefined
property ::$modelClass on the version 1.1.x.x
anyone can explain me what's wrong here ?
Kind Regards.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---