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
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"
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
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. 👍
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???
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.
Hey! Your tutorials are great but please do something with sound on introduction :) Just take mikrofon closer to you, if you want to hide your microfon you could place them under the view but close to you. Another way is bring more staff to you room to make reverb much smaller ;) If you need any advice about sound you can let me know.
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
can you help me with a problem please... i Need to filter a single string of a id from the list of string of id which is inthe database using this method you said can u tell me please
I am sorry but you said we are using that to avoid using if/else ,in the second example it ends up doing this , you have an if check for every search criteria
Quite a bit of information here, yet very disappointing that you are choosing to become far more involved than the last lessons. If you are choosing to show the more advanced areas of JPA I think more specific explanations are required. There is far too much for a beginner to consume, and you merely are instructing watchers to follow along with what you do, but failing to educate them on the what and why. For me, criteria queries are a rather less-than-basic-feature of JPA and, in this current example, highly unnecessary and over complicate things substantially. It almost feels as if you have skipped several more introductory lessons to JPA queries and started right in at the deep end. You do some great material, but many of your lessons are rather to off the flow for beginners. For me, I think most of your content is fantastic, even as an old and seasoned developer I always get something out of them,. but I feel here you have lost direction somewhat.
Hi, Thank you for the feedback. All the answers for your questions are in the spring data jpa complete lesson. It is better to enable the notifications to get all the recent videos.
Join the Micro Services course waiting list and get and get an exclusive *EARLY-BIRD discount*
aliboucoding.ck.page/d0f9317e13
I didn't even heard about criteria queries in spring boot. Thank you so much for sharing knowledge with us, Sir ❤🌻.
Glad you liked it!
Jazaka llaho khayran
Thank you for providing this tutorial, it is so unique
Happy you liked it!
Thanks a lot! Your guide helped me to avoid creation of bunch of unnecessary methods within my repo layer :)
Glad it helped!
Man you are a life saver, till this video I didn't know about this feature of JPA. Thanks a lot man.❤❤
Happy you liked it!
You can also check the SPring Data JPA advanced course on my website aliboucoding.com/courses
@@BoualiAli Thank you so much and Please make video on Unit testing
@@toufiqulislamimran7911 soon
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
Thank you very much sir really appreciate your effort.
Exactly ; I repeated the video , and you explained very well when criteria is used ; thnaks a lot dear Teacher
My pleasure 😇
Very helpful. Thank you so much.
Glad it was helpful!
Always the best. Keep going bro.
Thanks a lot.
I will
Excellent tutorial
Great job ,keep going
Thank youuuuu
Great, Thank you Bouali
Thank you
Nice tutorial, thx man!
Happy you enjoyed it
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"
You can check the exception handling video
Great explanation
Glad it was helpful!
great video. Quick question, what about if email has underscore characters(_) ?
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
Enjoy this
aliboucoding.com/p/first-hands-on-spring-boot-framework
@@BoualiAli Thank you so much teacher
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. 👍
Thanks a lot man❤
You're welcome!
@BoualiAli Can you make a video on search on multiple table using criteria query ?
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???
How can make the list be a custom Response, e.g EmplyeeResponseDto and also how do I query relation of Employee (e.g depeartment)
thank you very much
My pleasure!
Question: Is there anyway to access Join tables using criteria API ?
Merci beaucoup pour le tuto Sensei! ça aurait été encore plus plus cool illustré avec un pageable.
Noted
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.
Can you share more details?
Maybe in our discord server, sharing will be easier and get faster feedback
Hey! Your tutorials are great but please do something with sound on introduction :) Just take mikrofon closer to you, if you want to hide your microfon you could place them under the view but close to you. Another way is bring more staff to you room to make reverb much smaller ;) If you need any advice about sound you can let me know.
Thank you so much for the nice feedback.
I upgraded my setup for better quality.
Yes I would like to discuss more with you.please reach out on discord
tres bien bravo
Thank you
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
User Projection
If I want to join a table in Criteria, how should I do it?
This syntax doesn't work with Hibernate 6 as we cannot use the same predicate more then once. Can you please re-record for Hibernate 6?
Thank You
My pleasure
How do we join multiple tables in criteria query ?
I will make a video on that soon
Nice..What if there are multiple filter conditions like for 20 fields..?
Same way
Thanks a lot
Welcome
didn't understood the last part of using toArray and passing it to the or method
what spring-data-jpa-pro-class whait project in github want to do,it's about easier using JPA?Looking forward your answer,thacher
This is the spring data jpa pro class course coming really soon.
Join aliboucoding.com and you receive an email when the course is released
@@BoualiAli tks
can you help me with a problem please...
i Need to filter a single string of a id from the list of string of id which is inthe database using this method you said can u tell me please
Can you give an example?
I didn’t get what you mean
@@BoualiAli how to search a single string in list of string
I am sorry but you said we are using that to avoid using if/else ,in the second example it ends up doing this , you have an if check for every search criteria
there is a difference between if..else to compose a query and if..else for null check
Hi! Thanks for the tutorial, it was great. There is a github where I can find the source code?
In the description
i believe this all can be greatly simplified by using Derived Query Methods in Spring Data JPA Repositories right sir?
It is possible but you will need to write a complex query for it to handle all the fields.
Criteria query is more flexible in that direction
I have a question why use Predicate[0] ?
Foo[] array = list.toArray(new Foo[0]);
Do you have junit for this code?
Unfortunately not
@@BoualiAli how to write junit for this any book anywhere
do you have the code for this project in github, cause I can't find it
ps: great vid
Sorry, no
why yo doesn't suggest us dynamic query like any repo @Query ?
Will add it in the next video
In your opinion, is there an advantage of always using "Criteria Queries" despite it being too long and complicated ?
Always, I would say no
I already explained the use case of criteria queries
there are lots of thing what ı dont know. I have to learn these descriptions 🙁
Yes, the learning path is quite long but nothing is impossible
Could you provide source code link please?
I will try to find it and update the description
Quite a bit of information here, yet very disappointing that you are choosing to become far more involved than the last lessons. If you are choosing to show the more advanced areas of JPA I think more specific explanations are required. There is far too much for a beginner to consume, and you merely are instructing watchers to follow along with what you do, but failing to educate them on the what and why.
For me, criteria queries are a rather less-than-basic-feature of JPA and, in this current example, highly unnecessary and over complicate things substantially. It almost feels as if you have skipped several more introductory lessons to JPA queries and started right in at the deep end.
You do some great material, but many of your lessons are rather to off the flow for beginners. For me, I think most of your content is fantastic, even as an old and seasoned developer I always get something out of them,. but I feel here you have lost direction somewhat.
Hi,
Thank you for the feedback.
All the answers for your questions are in the spring data jpa complete lesson.
It is better to enable the notifications to get all the recent videos.