HABTM and has_many through only work in one direction

I have two models that have a habtm relationship and it only seems to be working in one direction.

The two models are "recipe" and "msn_lifestyles_feed" with a join table called "msn_lifestyles_feeds_recipes"

the tables for msn_lifestyles_feed and msn_lifestyles_feeds_recipes are in the same database and the recipe table is in a completely different database.

When I create a recipe object, it works fine and I can see all the feeds that it's a part of but when I create a feed object and try to access all its recipes I get an error saying:

OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server    Invalid object name 'dbo.msn_lifestyles_feeds_recipes'

I've also tried this using has_many :through and I get the same error. Any help on this would be greatly appreciated.

Nm, found the solution after two days of pounding my head against my desk.

It turned out the problem had to do with the use of two different databases.