Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我收到警告:
Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
带有一个Criteria对象(Restrictions类)。当 Criteria 对象似乎没有Criteria::setString.
Criteria
Restrictions
Criteria::setString
这是我的标准: criteria.add(Restrictions.eq("userId", 1);
criteria.add(Restrictions.eq("userId", 1);
你说得对,我删除了这一行,警告仍然存在。?这是由于在 a @NamedQuery(内部)中使用了 posistionnal 参数引起的,@Entity这在 Hibernate 4 中似乎已被弃用。
?
@NamedQuery
@Entity