just set the proper variables inside your model var $useTable = "Service"; var $primaryKey = "operatorID";
have fun :) On 12 Mag, 17:39, "j.h09" <[email protected]> wrote: > Hi all, > > This is my database table : > > DROP TABLE IF EXISTS `Service`; > CREATE TABLE IF NOT EXISTS `Service` > ( <----------- 'Service' instead of > 'Services' > `id` int(10) unsigned NOT NULL AUTO_INCREMENT, > `operatorId` int(11) unsigned NOT NULL, > <--------------- 'operatorId' instead of 'operator_id' (FK) > PRIMARY KEY (`serviceId`), > KEY `Index_OperatorI d` (`operatorId`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; > > As you can see : > - the name of the table 'Service' is not a plural, > - and the foreign key 'operatorId' is without underscore. > > The problem is that I cannot change these naming conventions. > > Is there any solution to make cakePHP model work with this table? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
