pagination with eagerfindersql

I have installed the plugin eagerfindersql.

if i try to insert :limit and offset in find:
events=Event.find(:all, :limit=>10,:offset => 0,:include =>
[:event_type_names,{:event_dates => {:place => :locality}}],
          :finder_sql => query,
          :column_mapping => {...

this not works and show all elements.

if i try to insert limit in query. the events that returning are
less of

With the plugin, the sql that is used is the one passed via
the :finder_sql.
Just looking quickly at the plugin's code, this suggests that it will
ignore the :limit and :offset you're supplying.
You just have to write the whole query yourself (which is rather the
point of the plugin)


You're probably running into the fact that limiting and eager loading don't really mix. You'll probably have to replicate what activerecord does under the hood when you don't use eagerfindersql:
1 query to determine which events to load (and get back from that the ids to load), and a second query that loads them with the associations.