I think this is something related to yor RDB.
Never see on other RDB.
Can you checlk the SQL generated by turning the log level to DEBUG.
If it generates a IN clause, i believe Oracle cannot hold more than 1000 elements in a IN Clause.
That is what is happening. Good call! Any suggestion for a work around?
I think that Oracle can give you a better answer.
So does that mean if I'm going to have a oracle backend that I can't use CMP?
Did you solve this problem or found a workaround?
I just ran into similar case, when iterating over
collection from findAll() and doing a bulk update.
When i look into my server.log i see strange SQL with 1000 of "OR PK_FIELD=?" generated in the WHERE -clause.
I just wonder, if this could be the same problem.
I'm using JBoss 3.2.1 and Oracle8.
any advises to solve the problem?
No I have found a work around yet.
It has moved downward on my priorities.
you should create a load-group for the loading of your entities. The SQL jboss creates is then no more like 1000 (OR PK=?) it loads the eager load groups first and then the lazy load groups. An example is in the jboss docs (Gangster ejb).
If Oracle says it has no more memory, then increase the databases memory. Usualy this happens when jboss generates a lots of (OR PK=?).
hope it helps a bit
For what it's worth, we have been using Oracle9i with JBoss 3.0.x and 3.2.x for the last 18 months or so and have never seen this behaviour.
We in fact had to write some custom code to restrict the results collection to a 1000 or so, because we were getting way more that could be practically displayed, even a page at a time.
Are you using the latest JDBC drivers? The other possibility is that it is a limitation of the "thin" driver. We use the "oci" type.