You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My rails application, on my development environment, runs on SQLite, but access some legacy Oracle database (using ActiveRecord::Base.establish_connection on the legacy models).
Since it's a legacy database, used mostly for querying, I use find_by_sql a lot. I started working with will_paginate on some queries, switched my calls to find_by_sql for paginate_by_sql, but Oracle started complaining about SQL syntax errors.
Digging through the logs, I noticed that will_paginate added 'LIMIT 20 OFFSET 20' to my query - the SQLite way of pagination. Looks like it's trying to use the adapter configured for ActiveRecord::Base, and not for my additional model.
The text was updated successfully, but these errors were encountered:
Sorry, our paginate_by_sql support is really limited on other database adapters. I'm afraid you will have to write your own pagination and count queries for Oracle.
My rails application, on my development environment, runs on SQLite, but access some legacy Oracle database (using ActiveRecord::Base.establish_connection on the legacy models).
Since it's a legacy database, used mostly for querying, I use
find_by_sql
a lot. I started working with will_paginate on some queries, switched my calls tofind_by_sql
forpaginate_by_sql
, but Oracle started complaining about SQL syntax errors.Digging through the logs, I noticed that will_paginate added 'LIMIT 20 OFFSET 20' to my query - the SQLite way of pagination. Looks like it's trying to use the adapter configured for ActiveRecord::Base, and not for my additional model.
The text was updated successfully, but these errors were encountered: