Skip to content

Problem with will_paginate #1030

@TheSynthMaster

Description

@TheSynthMaster

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions