Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced owner search functionality #1777

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

APerumalRaj
Copy link

This pull request updates the owner search functionality to allow users to search by any part of the owner's name.
Previously, the search was restricted to matching the last name only.

  • Updated controller logic to support partial matching.
  • Updated repository method to query using LIKE.
  • Added/modified tests to verify the new functionality.

@pivotal-cla
Copy link

@APerumalRaj Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@APerumalRaj Thank you for signing the Contributor License Agreement!

@@ -53,7 +54,10 @@ public interface OwnerRepository extends JpaRepository<Owner, Integer> {
* @return a Collection of matching {@link Owner}s (or an empty Collection if none
* found)
*/
Page<Owner> findByLastNameStartingWith(String lastName, Pageable pageable);
// Page<Owner> findByLastNameStartingWith(String lastName, Pageable pageable);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why commented?

@@ -124,10 +124,15 @@ private String addPaginationModel(int page, Model model, Page<Owner> paginated)
return "owners/ownersList";
}

private Page<Owner> findPaginatedForOwnersLastName(int page, String lastname) {
// private Page<Owner> findPaginatedForOwnersLastName(int page, String lastname) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to have commented dead code.

Copy link
Contributor

@andrzejsydor andrzejsydor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to be updated

Signed-off-by: Perumal Raj A <[email protected]>
@APerumalRaj
Copy link
Author

@andrzejsydor I have made the requested changes. Please review and let me know if any further modifications are needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants