ColdFusion 9.0.1 brings multiple datasources support for ORM. Here is how to set it up.
In this example, we are going to use both the cfartgallery and cfbookclub datasources. In the Application.cfc we will make the cfartgallery the default datasource. Optionally we are going to set the dbcreate rules differently for the two datasources. (We could also do this for the schema, catalog, dialect and sqlscript settings.)
From cfartgallery we will use the Art table as an object. As cfartgallery is the default datasource, this is set up as usual:
For any tables from the cfbookclub datasource there is an additional attribute "datasource" for the component:
We can then get the data and dump it like so:
Pretty straighforward and pretty cool stuff.