code4lib / ruby-oai

a Ruby library for building OAI-PMH clients and servers
MIT License
62 stars 43 forks source link

Prefix column names with model's table name in ActiveRecord wrapper. #39

Closed rwd closed 2 years ago

rwd commented 9 years ago

If the model has a default scope which joins other tables, the references to column names in the ActiveRecord wrapper's SQL conditions and order clauses may be ambiguous, resulting in an SQL error.

This commit fixes that by prefixing the column names with the model's table name.

jrochkind commented 4 years ago

Hi, I know this is really old. I am now a committer/owner of this project, and trying to clean it up a bit. Are you still interested in this @rwd ?

barmintor commented 2 years ago

Review of this change should move to #102 which rebases these changes on the default branch, and updates the tests to demonstrate the bug and verify the fix.