how to implement retrieval of DB records by two params?
hey guys. i want to ask you for advice. so im coding an api which takes two params (season of the year, distance of the hike) and returns a list of items that i should put in my backpack. in DB i have one table
and idk how to add
Items with three columns id, name, season, distance. but i was wondering how to incorporate these two criterias in my code. like how to approach it? i have this service now:and idk how to add
get by distance functionality. i dont want to have two separate methods (one for retrieving items by season, and one for filtering those records by distance). I can have just one method (obviously). but idk if having public List<Item> getItemsBySeasonAndDistance(String season, double distance) method makes sense. what do u guys think? thanks