org.hibernate.Query.addQueryHint()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(349)

本文整理了Java中org.hibernate.Query.addQueryHint方法的一些代码示例,展示了Query.addQueryHint的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.addQueryHint方法的具体详情如下:
包路径:org.hibernate.Query
类名称:Query
方法名:addQueryHint

Query.addQueryHint介绍

[英]Add a DB query hint to the SQL. These differ from JPA's javax.persistence.QueryHint, which is specific to the JPA implementation and ignores DB vendor-specific hints. Instead, these are intended solely for the vendor-specific hints, such as Oracle's optimizers. Multiple query hints are supported; the Dialect will determine concatenation and placement.
[中]向SQL添加DB查询提示。这些与JPA的javax不同。坚持不懈QueryHint,它特定于JPA实现,并忽略DB供应商特定的提示。相反,它们仅用于特定于供应商的提示,例如Oracle的优化器。支持多个查询提示;方言将决定连接和位置。

代码示例

代码示例来源:origin: riotfamily/riot

@Override
public TypedQuery<T> addQueryHint(String hint) {
  query.addQueryHint(hint);
  return this;
}

代码示例来源:origin: com.github.cafdataprocessing/corepolicy-hibernate

@Override
public Query addQueryHint(String s) {
  return query.addQueryHint(s);
}

相关文章