Итак, мой сервер работает на локальной машине. Там все работает, и я просто хотел расширить возможности сервера, добавив модель агентства.
Затем я помещаю все файлы на сервер разработчика, чтобы сделать его доступным в Интернете - и когда я пытаюсь перейти в «агентства» (domain.com/agencies/) - появляется ошибка таблицы пропавших баз данных.
Все отлично работает на моем компьютере.
Я проверил 5 раз, если все имена в базе данных являются правильными.
Я проверил файл database.cfg в cakephp, но он должен быть хорош - все остальное там работает.
Пожалуйста, помогите!
Обновление
Очистка кеша моделей не помогла
Вот код модели:
<?php
class Agency extends AppModel{
var $name = 'Agency';
var $validate = array(
'id' => array(
'blank' => array(
'rule' => array('blank'),
//'message' => 'Your custom message here',
//'allowEmpty' => true,
//'required' => true,
//'last' => false, // Stop validation after this rule
'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'company' => array(
'notempty' => array(
'rule' => array('notempty'),
//'message' => 'Your custom message here',
'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'website_url' => array(
'url' => array(
'rule' => array('url'),
//'message' => 'Your custom message here',
'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'status' => array(
'notempty' => array(
'rule' => array('notempty'),
//'message' => 'Your custom message here',
'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'profession_id' => array(
'multiple' => array(
'rule' => array('multiple', array('min' => 1)),
'message' => 'Please select at least 1 profession',
//'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'seniority_id' => array(
'multiple' => array(
'rule' => array('multiple', array('min' => 1)),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'industry_id' => array(
'multiple' => array(
'rule' => array('multiple', array('min' => 1)),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'sector_id' => array(
'multiple' => array(
'rule' => array('multiple', array('min' => 1)),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'zone_id' => array(
'multiple' => array(
'rule' => array('multiple', array('min' => 1)),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'size' => array(
'notempty' => array(
'rule' => array('notempty'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
)
);
var $hasAndBelongsToMany = array(
'Profession' => array(
'className' => 'Profession',
'joinTable' => 'agencies_professions',
'foreignKey' => 'agency_id',
'associationForeignKey' => 'profession_id',
'unique' => true,
//'conditions' => '',
//'fields' => '',
//'order' => ''
),
'Seniority' => array(
'className' => 'Seniority',
'joinTable' => 'agencies_seniorities',
'foreignKey' => 'agency_id',
'associationForeignKey' => 'seniority_id',
'unique' => true,
//'conditions' => '',
//'fields' => '',
//'order' => ''
),
'Industry' => array(
'className' => 'Industry',
'joinTable' => 'agencies_industries',
'foreignKey' => 'agency_id',
'associationForeignKey' => 'industry_id',
'unique' => true,
//'conditions' => '',
//'fields' => '',
//'order' => ''
),
'Sector' => array(
'className' => 'Sector',
'joinTable' => 'agencies_sectors',
'foreignKey' => 'agency_id',
'associationForeignKey' => 'sector_id',
'unique' => true,
//'conditions' => '',
//'fields' => '',
//'order' => ''
),
'Zone' => array(
'className' => 'Zone',
'joinTable' => 'agencies_zones',
'foreignKey' => 'agency_id',
'associationForeignKey' => 'zone_id',
'unique' => true,
//'conditions' => '',
//'fields' => '',
//'order' => ''
)
);
var $hasMany= array(
'Office' => array(
'className' => 'Office',
'foreignKey' => 'office_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
}
Обновление
Отладка была установлена на 2 с самого начала, потому что это сервер разработки.
Обновление
Речь идет не об именах в нижнем / верхнем регистре.