On Mar 4, 2010, at 6:37 AM, onno wrote:

I've noticed this too. Its caused by a fix(?) in commit
f5b76ea65e52da7c8dcfbeea21fa3a6b2ed0af9d

# Return the entry from #columns for the named column
   def self.column(name)
     return unless table_exists? # <===== table_exists? causes the
extra selects
     name = name.to_s
     columns.find {|c| c.name == name }
   end

Remove the first line and the extra select statements should
disappear. Don't know if this is a bug or intended.

The table_exists? line isn't a bug - it was actually added to stop other bugs related to STI and the migration generator.

I *assumed* that table_exists? would be cached by the DB adapter - apparently I was wrong. I'll take a look.

--Matt Jones

--
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to