Is there a way in Castle Active Record/NHibernate to join across two databases?
I have data in 2 tables in separate databases that I need to join together and return in one query resultset. If there isn't an OO-way to do it, can it be done using either hql or worst case, is there a standard way to execute dynamic sql and have it return back some sort of collection, such as a datatable?
If you have the two tables already mapped, but in separate session factories, I don't think you can do much about it. You'll have to "join" in your own code.
If that's not the case, you can map the foreign table through a database view, i.e.:
and map this view in ActiveRecord as if it were a local table.