Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11600 (new defect)

Opened 1 month ago

"Unknown column" error message could be unknown table

Reported by: martiantim Assigned to: core
Priority: low Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords:
Cc:

Description

In an error message like the below

Mysql::Error: Unknown column 'agentsgenerations.generation_id' in 'where clause': SELECT ..."

it was actually the table name (agentsgenerations) that didn't exist (stupid typo). It would be nice if the message said that.

Here's the code that generated the message:

for agentgen in AgentsGeneration.find(:all, :conditions => "agentsgenerations.generation_id = #{gen.id}",

:include => [:agent, { :agent => [:feedback_bundle, :agents_generations] }])