Changes between Initial Version and Version 2 of Ticket #14441
- Timestamp:
- Oct 11, 2010, 11:13:00 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #14441
- Property Triage Stage Unreviewed → Design decision needed
-
Ticket #14441 – Description
initial v2 1 1 Trying to retrieve a set of objects based on field values. I build the set of values as an array 2 2 {{{ 3 3 namelist=[] 4 4 }}} 5 5 .. some code that does namelist.append(name) many times 6 6 {{{ 7 7 obl=MyObject.objects.filter(namefield__in=namelist) 8 8 9 9 obl.count() 10 }}} 10 11 if namelist is longer than 1000 then Oracle throws an error 12 {{{ 11 13 Traceback (most recent call last): 12 14 File "<console>", line 1, in <module> … … 24 26 raise e 25 27 DatabaseError: ORA-01795: maximum number of expressions in a list is 1000 26 28 }}} 27 29 I don't know if there is an easy way to combine querysets as splitting them into batches of a suitable number would be no problem if they could be combined later.