cakephp/cakephp — pull request #262 by rchavik (2011-10-19 16:08:42+00:00)
Title: Fixes for #105 (lighthouse)

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.

Model, Behavior, and Database tests passed.