-
Notifications
You must be signed in to change notification settings - Fork 328
Description
I have this problem when using the gem will paginate, using jrails 9.1.5.0, rails 5.0.0.1 under windows.
I'm not 100% sure if this is a problem of will paginate or oracle enhanced, but I suspect it's a bug in oracle enhanced dealing with limits to the number of returned rows.
This work:
@vendors = Vendor.all
This don't work
@vendors = Vendor.all.paginate :per_page => 20 , :page => params[:page]
giving the following error message:
Java::JavaSql::SQLException: Missing IN or OUT parameter at index:: 3:
SELECT * FROM (
SELECT raw_sql_., rownum raw_rnum
FROM (SELECT "VENDORS"._ FROM "VENDORS" ORDER BY "VENDORS"."ID" ASC ) raw_sql_ WHERE rownum <= (:a1 + :a2) ) WHERE raw_rnum_ > :a1
The query in itself it's correct, eg:
SELECT * FROM (
SELECT raw_sql_., rownum raw_rnum
FROM (SELECT "VENDORS"._ FROM "VENDORS" ORDER BY "VENDORS"."ID" ASC ) raw_sql_ WHERE rownum <= (100) ) WHERE raw_rnum_ > 0
in toad just works... any ideas?