Ok, it seems like Jboss split the query into many queries if the
"OR NAME=?" gets bigger.
Is there anyone that have any thoughts about how Jboss are doing the underlying queries and omptimizing them?. Is the way queries are done following the J2EE spec, or is this spec not saying anything about how it should be done?
I'm just qurious.
I am facing the same problem, in my case its still worse as it brings down the database service, i have posted regarding this at
Please throw some light on this issue.
Never the spec speak about SQL implementations of container managed persistence.
I agree with you that the generated query is ugly, and can be optimized.
But for now, using the CMR getter gives this result.
This subject has been already on other topics:
See this one which gives you the solution for not hanging the database with timeouts or too long queries: