I've simplified it

/*
MODELS
*/
class LocalNumber extends AppModel {
        var $useDbConfig = 'prepaid';
        var $name = 'LocalNumber';
        var $hasOne = 'LocalAccount';
}

class LocalAccount extends AppModel {
        var $name = 'LocalAccount';

        var $belongsTo = array(
                        'LocalNumber' => array(
                                'className' => 'LocalNumber',
                                'foreignKey' => 'local_number_id'
                        )
        );

}

/*
TABLES
*/
/*

CREATE TABLE `local_numbers` (
  `id` mediumint(9) NOT NULL,
  `desc` varchar(100) collate latin1_general_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

INSERT INTO `local_numbers` (`id`, `desc`) VALUES
(10004, 'super trooper');


CREATE TABLE `local_accounts` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `user_id` int(10) unsigned NOT NULL,
  `local_number_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

INSERT INTO `local_accounts` (`id`, `user_id`, `local_number_id`)
VALUES
(1, 1, '10004');


*/

now when models are using same DB (useDbConfig=default) it works
when LocalNumber uses another one it doesn't

what the hell ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to