hi,

i just commited a new feature that allows splitting of large IN-Criteria.
addIn("id", (1,2,3,4,5,6)) results in WHERE id IN(1,2,3,4) or id IN(5,6)
with an inLimit of 4.

the max number of values of an SQL-IN-Statement (the inLimit) isdefined in
OJB.properties:

#
# The SqlInLimit entry limits the number of values in IN-sql statement,
# -1 for no limits. This hint is used in Criteria.
SqlInLimit=200
#

this entry replaces the former 'PrefetchInLimit' because prefetch now also
uses 'SqlInLimit'.
prefetching still works the _old_ way, using multiple queries instead of one
with multiple IN-Statement:

select from ... where id in(1,2,3,4)
select from ... where id in(5,6)

this behaviour could now easily be changed to multiple IN-Statements:

select form ... where id in(1,2,3,4) or id in(5,6)

i just do not know which one is better ???

jakob


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to