Comments (10)
Is the problem with UUID? I don't remember adding any specific code for handling UUID objects, so I'm not sure if that works. Where does the exception occur?
Also, I don't think Jinq can handle JPQL.isIn() with streams passed in from outside the query. I think it can handle Lists of objects passed in from outside the query, but you can't pass in entire streams. If you want to use streams in JPQL.isIn(), you must actually create the stream in the query itself:
proxyStream.where((proxy, source)->{
var proxies = source.stream(ProxyEntity.class).where(item -> item.getClientId().equals(id))
.select(ClientPerProxyEntity::getProxyId);
return JPQL.isIn(proxy.getId(),proxies);
})
or something like that
from jinq.
then why it worked in the second example ?
Could be the existence of source
is the key?
I think you are right, I will try and tell you of the results
from jinq.
I have no idea. It's been a while since I wrote the code for that, so maybe it does work. I can't really remember the details without digging through the code. But I don't think it should from what I can remember. Does that code appear inside another query?
Like I said, it might be the UUID issue. Which line does the exception occur from?
from jinq.
The exception occurs in this line:
proxyStream.where(proxy->JPQL.isIn(proxy.getId(),proxies)
from jinq.
Yeah, then it must be an issue with passing a stream into the query. Jinq's streams are not serializable. The stream has to be created inside the query itself, so that Jinq can analyze it.
from jinq.
I think you can also just call toList() to convert the stream into a list, and then you can pass the list into the query. But that will execute that subquery separately from the main query, which might be slow depending on what you're doing.
from jinq.
The problem is, after a certain 2700 items in the list SQL server refuses to perform the match
from jinq.
Yes, you will then need to run the whole query on the database. So you will have to construct the stream inside the query itself so that Jinq can analyze it and construct a database query from it.
from jinq.
Yes, you will then need to run the whole query on the database. So you will have to construct the stream inside the query itself so that Jinq can analyze it and construct a database query from it.
Working on it, I have a kind of abstraction layer for allowing me to dynamically construct where condition using Jinq in Spring Boot, I have done the moving from Where
to WhereWithSource
validating now
from jinq.
It worked, However, I need now validate every other old Where
with the new WhereWithSource
, I have a long day ahead of me.
Thanks
from jinq.
Related Issues (20)
- toList() commit transaction ignoring JPA-Transactional HOT 3
- Question... How does Jinq guesses the operators in Lambdas HOT 1
- Anonymous class as a custom tuple HOT 6
- Could not translate code to a query HOT 6
- fail with registerCustomSqlFunction HOT 5
- How to get the total count after group by? HOT 2
- How to get the number of groups HOT 1
- How to get the number of groups by issuing a separate query after group by? HOT 3
- Support java v21 HOT 5
- can't leftOuterJoin support subquery? HOT 2
- [BUG]: The concatenation of strings was not as expected HOT 4
- [Feature] join supports on condition HOT 1
- [Feature] Add support for additional collection libraries HOT 3
- Where filtering after select with projection gives error HOT 2
- Move from javax.persistence to jakarta.persistence. HOT 6
- Java 13 supported? HOT 2
- Compare int, datetime, bool to String HOT 1
- Could not analyze lambda code HOT 1
- jdk11 support HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jinq.