Explanation:
- @Query Annotation: This annotation allows us to write custom JPQL (Java Persistence Query Language) queries directly, which can be more flexible than relying on naming conventions.
- Parameter Indexing: The
?1
indicates the first parameter of the method, which in this case ispName
. This approach makes the query easier to read and understand.
Comments
Post a Comment