Spring Data JPA -Criteria Queries - The Full Guide

preview_player
Показать описание

Spring Data JPA -Criteria Queries - The Full Guide

In this tutorial you will understand how to implement an advance search functionality using the JPA criteria queries which will give more flexible ways of writing a query without need of raw SQL.
Criteria queries allows you to create queries using Object Oriented.

Don't Forget to
===========================================
💯 Subscribe to the youtube channel

Table of content

00:00 Introduction
01:55 Join our community
02:27 Introduction to Criteria Queries
05:28 Create a simple query
21:57 Create an advanced query using a search object
Рекомендации по теме
Комментарии
Автор

Join the Micro Services course waiting list and get and get an exclusive *EARLY-BIRD discount*

BoualiAli
Автор

I didn't even heard about criteria queries in spring boot. Thank you so much for sharing knowledge with us, Sir ❤🌻.

supun_sandaruwan
Автор

In the first case, the request will look like: select * from employee where (last_name = LIKE '%:lastName%' OR first_name LIKE '%:firstName%') AND first_name LIKE '%:email%') That is, the OR predicates will be in parentheses (1 OR 2) AND 3, since they are in a separate predicate

yashkevich
Автор

great video. Quick question, what about if email has underscore characters(_) ?

cheke
Автор

Thank you for your kind explanation, keep going ❤❤❤.

Please, I would like to know what is the best practice for handling exception :
extending "Exception" or extending "RuntimeException"

spring
Автор

Thanks a lot! Your guide helped me to avoid creation of bunch of unnecessary methods within my repo layer :)

wrk
Автор

Thank you for providing this tutorial, it is so unique

fatemehsalem
Автор

Exactly ; I repeated the video, and you explained very well when criteria is used ; thnaks a lot dear Teacher

attabou
Автор

Hmm. Full Guide without joins and join fetch?! But you gave good approach. Thanks. It will be great if you create really full guide for Criteria Queries with joins and fetch joins and some queries which we don't know. 👍

kyrylochornobryvets
Автор

Man you are a life saver, till this video I didn't know about this feature of JPA. Thanks a lot man.❤❤

toufiqulislamimran
Автор

Thank you for this tutorial but I have a question for that topic. How we can search to date range with criteria query. Would you explain or refer for me???

elkhanismayilov
Автор

Thank you very much sir really appreciate your effort.

soumikdash
Автор

Thanks so much teacher, I'm a newbie Springboot. I don't know how to create complete API with relationship between tables. Other tutorial videos just teach me how to create API based on an entity. I hope you can do a video about my problems, thanks <3 <3

pqan
Автор

Nice video. Just having some trouble with querying nested objects in my entities. I'm using the @Embedded / @Embeddable annotations, but am not quite sure how to format the json data in my request body so that Spring understands.

larsmichael
Автор

@BoualiAli Can you make a video on search on multiple table using criteria query ?

imranmomin
Автор

How can make the list be a custom Response, e.g EmplyeeResponseDto and also how do I query relation of Employee (e.g depeartment)

codewithtee
Автор

Thank you for your video. Can you tell me how to join multiple tables where the returned result list is a collection of attributes from those tables.I'm sorry that my English is very bad. I hope you will understand

hoangkim
Автор

Question: Is there anyway to access Join tables using criteria API ?

Utub-qccz
Автор

Merci beaucoup pour le tuto Sensei! ça aurait été encore plus plus cool illustré avec un pageable.

mouhamedbasse
Автор

Nice..What if there are multiple filter conditions like for 20 fields..?

ankukoul