Hi,
I’m Loving CakePHP, congrats to everyone envolved in its development.
I’ doing a project with cakephp which has 2 parts:
1- A frontend for the user to interact.
2- A backend which automatically collects data from equipments.
The frontend is beeing build using cakephp’s namming convention and it’s almost done. But Now I have to link my items table that belongsTo a table created by the backend application.
The problem is that the backend application does not use cakephp’s naming convention and therefore has camelcased names for tables and columns.
I tryied in items controller:
$this->belongsTo(‘Tags’,[
‘className’ => ‘TagTable’,
‘foreignKey’ => ‘TagIdx’,
‘propertyName’ => ‘tag’
]);
The result was :
Cannot describe tag_table. It has 0 columns
and using double quotes
$this->belongsTo(‘Tags’,[
‘className’ => ‘“TagTable”’,
‘foreignKey’ => ‘TagIdx’,
‘propertyName’ => ‘tag’
]);
Cannot describe “tag_table”. It has 0 columns
I tried to find anything related in the cookbook despite it says that the naming conventions is not mandatory and that you can define which classes and fields to use as I tried, I cant find anything related to camelCased issues.
I cant change the the tables name because I don’t have access to the backend application’s source code.
I hope there’s a way,
Tanks in advance