From the course: Spring Data
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Challenge: Query by Example - Spring Tutorial
From the course: Spring Data
Challenge: Query by Example
(upbeat rhythmic music) - [Tutor] It is time for another Challenge, and this one is going to test whether you understand how to use Query by Example. For this one, we are in the Criteria Query Test, and on lines 37 and 38, we are using query methods to look up the humanities department by name and the professor whose last name is Black. So what I want you to try to do is modify both of these to return the same value, but use Query by Example, instead of these query methods, "find by name," and "find by last name," and bonus points, if you can make it case-insensitive on the professor name, give it a try.