Check if associations are loaded before lazy loading them?

Kris wrote:

I noticed that when you use an include on an association, for each record that does not have an association corresponding to the included association, an extra sql statement will be executed in order to find the record which you already know does not exist because it would have otherwise been fetched by the include already.

Rails 1.2 will cache nil association values.