What is the best way to query data?

There are good reasons to use them.

  1. They keep your queries organized in a single place and callable from anywhere in the project.
  2. Make reusing the same query simpler.
  3. Can be cached.
  4. Can be used in bindings.

Here is some more advise about when you should and should not use a Named Query

2 Likes