cakephp/cakephp — pull request #272 by rchavik (2011-10-24 01:16:53+00:00)
Title: Fixes for 105 (lighthouse): Saving habtm between different db-schemas 

DboSource::buildJoinStatement compares its own database against the
corresponding join Model database. This is required for habtm cross-db
find() operation to work.

Model::save uses joined Model's datasource instead of its own when
saving HABTM relationship.

Depends on: #271
Obsoletes: #262