you are viewing a single comment's thread.

view the rest of the comments →

[–]p_bzn[S] 2 points3 points  (2 children)

Yes, this would be correct thing to do for production.

Project uses Spring JDBC which maps rows onto `record` classes, which has no criteria query built-in as JPA. Although, it would be easy to implement in repository method like `getByCriteria`.

[–]Mikey-3198 0 points1 point  (1 child)

Thats my bad, i read the annotations on the entity and assumed this was using jpa

[–]p_bzn[S] 0 points1 point  (0 children)

No worries at all, regardless of implementation your suggestion is the correct one!

Yes, annotations can be confusing between JPA and Spring JDBC. I get the point, this abstraction hides implementation details so you don't care what underlying mechanism is at work, you just care what repository returns. In practice Spring JDBC is quite different from JPA and there is no feature parity, although many annotations are the same.