Skip to content
Snippets Groups Projects
Commit 52bb3337 authored by Joshua Gill's avatar Joshua Gill
Browse files

Query added to "ShopsRepo" to search by a categoryId

parent 8da5d60b
Branches
No related tags found
3 merge requests!56tags will be saved to userFavTags table (needs user ID of current logged in user),!50Merging for latest changes,!46Develop
......@@ -68,4 +68,12 @@ public interface ShopsRepo extends JpaRepository<Shops, Long> {
*/
@Query("select s from Shops s where s.stampBoard.stampBoardId = ?1")
Optional<Shops> findByStampId(long stampId);
/**
* Search by categoryId
* @param categoryId - the id to search by
* @return - list of all shops with that category
*/
@Query("select s from Shops s where s.category.categoryId = ?1")
List<Shops> findByCategoryId(long categoryId);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment