# ActiveRecord 2.3.3 in\_or\_equals\_for\_ids exception

**URL:** <https://www.ruby-forum.com/t/activerecord-2-3-3-in-or-equals-for-ids-exception/176332>\
**Category:** Rails\
**Created:** [September 29, 2009, 9:09am UTC](https://www.ruby-forum.com/t/activerecord-2-3-3-in-or-equals-for-ids-exception/176332 "2009-09-29T09:09:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 29, 2009, 9:09am UTC](https://www.ruby-forum.com/t/activerecord-2-3-3-in-or-equals-for-ids-exception/176332/1 "2009-09-29T09:09:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 29, 2009, 9:39pm UTC](https://www.ruby-forum.com/t/activerecord-2-3-3-in-or-equals-for-ids-exception/176332/2 "2009-09-29T21:39:17Z")

</div>

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, “removed\_email\_address@domain.invalid”
