-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inbound handling for ORA-01795 #1022
Comments
You can for now use I think we first have to think about including this in Querydsl. EDIT: since |
This is difficult to abstract in Querydsl since the in operation might be embedded quite deep, so it might be difficult to get the logic right if we decide to execute multiple queries and merge the results. Also pagination etc will make this difficult. But if the workaround is just splitting the list and creating multiple in expressions and combining them via or, then this could be maybe done by Querydsl. |
Yes, this is how I solved it for now.
or
|
@eldest I added now a pull request that fixes the issue. Could you take a look and maybe try it out? |
@timowest Ok, thank you, but I'll be able to test it at wednesday only. |
@timowest Well, I've tried it out and I have to say that It doesn't work for me. |
The current logic is only for querydsl-sql and for NativeSQL queries. As for JPQL, there is not really a way for us to reach the underlying database, and I don't think we want to do that. |
As already mentioned in the pull request fixing this for JPA queries is problematic, since this would make the contract between Querydsl and the JPA provider too blurry. The Querydsl JPA serialization contract is to create valid JPQL queries, the JPA provider will then create valid SQL out of that. After this fix the expression creation will at least be a lot easier for JPA queries ExpressionUtils.inAny(documentHdr.id, Lists.partition(ids, 1000)); compared to the non transformed documentHdr.id.in(ids); |
In addition to the code snippet above, you can also use I first thought Iterables.partition worked like Splitter, splitting to an Iterable, but it is partitioned to a List |
Released in 3.6.0 |
I've just had this problem, but how can I use this if I have where expression with or condition each of which has list with size over 1000? I can not call .or on Thanks |
Is there an inbound support for this?
http://stackoverflow.com/questions/17842453/is-there-a-workaround-for-ora-01795-maximum-number-of-expressions-in-a-list-is
I use querydsl(3.4.2) to work with Oracle DB.
The next query:
works fine until i get more than 1000 of elements at ids list, so I have to split it on the several lists and add them to "in" part via "or" statement.
The exception looks like:
The text was updated successfully, but these errors were encountered: