Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

relation batch_order doesn't quote table and column names

#6620

Thus if I'm using singular table names on postgres and querying against user it throws a syntax error because it's a reserved word (keyword). This showed up when trying to index on heroku with sunspot rails (solr).

The fix:

In batch_order in lib/active_record/relation/batches.rb change:

"#{@klass.table_name}.#{@klass.primary_key} ASC"

to:

"\"#{@klass.table_name}\".\"#{@klass.primary_key}\" ASC"

Reported by Joshua Kifer · March 24th, 2011 @ 10:24 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none