Problems with annotated named queries.
使用带注释的命名查询所带来的问题。
I have chosen to use named queries to illustrate a much larger problem.
我选择使用命名查询来说明一个更大的问题。
Hibernate provides no real namespace functionality for the named queries.
Hibernate不为命名查询提供任何真正的名称空间功能。
All of the named queries have been added as NamedQuery annotations on the entity.
所有已命名的查询在实体上被添加了Named Query注释。
It USES named queries to resolve the remainder of the URI and executes appropriate logic.
它使用已命名的查询来解析uri的其余部分并执行适当的逻辑。
Now, I can easily make changes to named queries without changing my source code and recompiling.
现在,我可以方便地对命名查询进行更改,而无需更改源代码和重新编译。
Will perform validation on all named queries at initialization time, and throw if any is not valid.
对所有的命名查询在初始化的时候执行验证,任何无效的查询会抛出异常。
In Listing 7, you can see where we instantiate this resolver after defining some basic named queries.
在清单7中,我们在定义了一些基本的已命名查询后实例化这个解析器。
Named queries enable you to define a query in a single location. There are many benefits to named queries.
命名查询使您能够在单个位置定义一个查询。
Named queries are just one example of how annotations can be overused.
命名查询只是注释如何被过度使用的一个示例。
Named queries are just one example of how annotations can be overused.
命名查询只是注释如何被过度使用的一个示例。
应用推荐