MrBanabas-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2009-Sep-29 07:07 UTC
ActiveRecord 2.3.3 in_or_equals_for_ids exception
Hi, Oracle Database using ActiveRecord 2.3.3 is throwing an exception when performing a find call. OvaSchedule.find(:all, :include => [:ova_program]) The root cause seems to be the following: in file: association_preload.rb method "in_or_equals_for_ids" is generating a sql IN condition. However, in my case there are more than 1000 ids and Oracle does nt like that. Does anybody have an idea how I might fix that? Thanks a lot in advance. -- Volker
MrBanabas-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2009-Sep-29 19:38 UTC
Re: ActiveRecord 2.3.3 in_or_equals_for_ids exception
Worked around that issue by using :offset, :limit in find call... Just in case anybody else is running into this issue. On 29 Sep., 09:07, "MrBana...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <mrbana...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Hi, > > Oracle Database using ActiveRecord 2.3.3 is throwing an exception when > performing a find call. > OvaSchedule.find(:all, :include => [:ova_program]) > > The root cause seems to be the following: > in file: association_preload.rb method "in_or_equals_for_ids" is > generating a sql IN condition. > However, in my case there are more than 1000 ids and Oracle does nt > like that. > > Does anybody have an idea how I might fix that? > > Thanks a lot in advance. > > -- > Volker