Criteria API is superset of jpql Instead of using jpql we can use the criteria API that can be executed by JPA provider 10:45 doing the same thing with jpql and criteria API Criteria API: - criteriaBuilder -> criteriaQuery -> Root CriteriaQuery allows us to chain sql like function calls Todo:- continue from 17:00
I mean I replaced the method like with equals, compiler was complaining, I had to set the generic type to String to get rid of the error like this one: query.select(postRoot).where(cb.like(postRoot.get("stamp"). -String- get("author"), "%Oliver%")); what I don't understand is why didn't I have to use generic type String with the equal method? I apologize if I am asking stupid questions since I am newbie to JPA :)
Great video, thanks for sharing
Criteria API is superset of jpql
Instead of using jpql we can use the criteria API that can be executed by JPA provider
10:45 doing the same thing with jpql and criteria API
Criteria API:
- criteriaBuilder -> criteriaQuery -> Root
CriteriaQuery allows us to chain sql like function calls
Todo:- continue from 17:00
very nice video, thanks.
Hi! Please add the github link to the video description. Thanks!
thanks for making this video.
thanks for your video
can we achive dynamic queryfor multipel table without reletionship(1-1,1-many....)?
Kevin,
How can I use "like" method instead of "equal" method for CriteriaBuilder?
I mean I replaced the method like with equals, compiler was complaining, I had to set the generic type to String to get rid of the error like this one:
query.select(postRoot).where(cb.like(postRoot.get("stamp"). -String- get("author"), "%Oliver%"));
what I don't understand is why didn't I have to use generic type String with the equal method?
I apologize if I am asking stupid questions since I am newbie to JPA :)
Please add source code link to the description.
I had to replace the less than and greater than characters around the "String" for generics to be able to post the comment.