Java – HQL “in” statement is not applicable to @ elementcollection

I have a class collection property with @ elementcollection and @ enumerated (enumtype. Ordinal)

I may have done something wrong when creating HQL itself Is it possible that the element is actually an enumerated value?

Thank you, Peter

Solution

According to document( http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/queryhql.html ), you should be able to do this using the 'in elements' expression:

However, there is an open error in Hibernate... It does not work as you expect for enumeration values, see: https://hibernate.onjira.com/browse/HHH-5159 To get a solution

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>