springframeworkguru / sfg-pet-clinic

SFT Pet Clinic
232 stars 1.99k forks source link

[UPDATE] Modify JPA method name #104

Open LOG-INFO opened 5 years ago

LOG-INFO commented 5 years ago

I am studying well by listening to your lecture.

Today I listened to your lecture (Section 11, Lecture 223. Fix Find Owner Like). In this lecture, you fixed

ownerService.findAllByLastNameLike(owner.getLastName());

to

ownerService.findAllByLastNameLike("%"+ owner.getLastName() + "%")

I searched for JPA method keyword, and I found Containing keyword.

So I fixed this code like this, and it works fine!

ownerService.findAllByLastNameContaining(owner.getLastName());

Please check this!

Your lecture is very good for me! Thank you very much!

LOG-INFO commented 5 years ago

In additional, This is my first PR to other's repository. Please let me know if this is the right way to PR.