# Camel Cased Table names and columns

**URL:** <https://discourse.cakephp.org/t/camel-cased-table-names-and-columns/3907>\
**Category:** Need Help\
**Created:** [February 11, 2018, 9:14am UTC](https://discourse.cakephp.org/t/camel-cased-table-names-and-columns/3907 "2018-02-11T09:14:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apostolo](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@apostolo](https://discourse.cakephp.org/u/apostolo)\
**Post date:** [February 11, 2018, 9:14am UTC](https://discourse.cakephp.org/t/camel-cased-table-names-and-columns/3907/1 "2018-02-11T09:14:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dmuenstermann](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@dmuenstermann](https://discourse.cakephp.org/u/dmuenstermann)\
**Post date:** [February 12, 2018, 2:31pm UTC](https://discourse.cakephp.org/t/camel-cased-table-names-and-columns/3907/2 "2018-02-12T14:31:00Z")

</div>

If I understand correctly, the table “Tags” is not managed by your cakephp-app, but managed by your backend-system.

Using cakephp3, you can simply create a table-class, define the (non-cake-convention-)table-name as the db-table to be used and your relation should resolve well.

See [this link](https://api.cakephp.org/3.0/class-Cake.ORM.Table.html#_table) for how to set the name of the database table that a cakephp-table-class is using (The method needs to be called inside the initialize()-function, if I reminder right).
