I have a form in Angular which looks like so
The user can input only the field he wants and I send the form to Spring Rest API like so
{
"symbol": "DOL",
"currency": "CAD"
}
From there how to redirect the JPA repository query. I mean if the user only select symbol then the query will be findAllBySymbol ; if the user select the symbol AND the currency then the query should be findAllBySymbolAndCurrency.
How to approach this? Should I query all and filter out? That does not sound optimal