I am currently learning Java EE and how to use JPA.
I have made a great database, which one of its table got more than 20 fields.
I was wondering what is the best way to get the results from the DB.
Currently, I am using a @NamedQuery
which takes like 12 or 13 parameters.
I was wondering if I could instead use the findAll()
method, then do a loop that verifies with .contains()
(for a String of course) if the record is what I am looking for.
From my point of view, this looks less complicated using the second method, maybe because I'm better with Java than JPA (at the moment)
Any piece of advice would be greatly appreciated, thank you very much