(these code samples demonstrate the *correct* way to do it, and are
1.1 and 1.2 compatible):
// database.php:
var $default = array(
'driver' => 'mysql',
'persistent' => false,
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'root',
'password' => 'pass',
'database' => 'my_db'
);
var $other = array(
'driver' => 'mysql',
'persistent' => false,
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'root',
'password' => 'pass',
'database' => 'my_other_db'
);
// models/first.php:
class First extends AppModel {
var $hasMany = 'Second';
}
// models/second.php:
class Second extends AppModel {
var $useDbConfig = 'other';
var $belongsTo = 'First';
}
Any questions?
On Mar 16, 12:26 pm, "rtconner" <[EMAIL PROTECTED]> wrote:
> I second nateklaiber. I would like to see some code examples also.
> The only way I've managed to do what you describe is to use
> getDataSource() and do it manually.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---