Rails 2.1.2, complex find involving complex include, bug?

So I'm upgrading my app from Rails 1.2.6 to Rails 2.1.2.

I have a complex find statement that worked in 1.2.6 and isn't working in 2.1.2. I think maybe this is a bug, although maybe there's something else I could be doing to work-around it?

My find statement involves: * Models in a module for namespace purposes * a join clause with raw SQL * an includes clause with multiple levels (the hash syntax)

This worked in 1.2.6:

We have encountered similar issues. We finally decided not rely on Rails finding any classes declared in a module namespace. We liked the organization that the module namespace provided as our models directory was getting pretty large. So we kept our file structure as is, but removed the namespace. Instead, we explicity "require" the classes in our environment.rb file. For example:

require File.dirname(__FILE__) + '/../app/models/reports/stats_report' require File.dirname(__FILE__) + '/../app/models/reports/standings_report'

This is a nasty bug and I hope it gets fixed soon. It's unfortunate Rails does not deal with namespaces properly -- at least I think it's a Rails issue.


Have you reported it?