s.grinovero wrote:
you shouldn't need the QueryImpl. what are you trying to do?
Hi Sanne, thanks for the reply. This is a really good question!
I was trying a HQL query with IN clause and query.setParameter(String string, Object value), see the example below:
I have the following query:
Code:
select prod from Product as prod where prod.categories IN (:cat)
In the Product bean, I have the following annotation mapping:
Code:
@ManyToMany(targetEntity=Category.class,fetch = FetchType.LAZY)
@JoinTable(
name="CATEGORYPRODUCTREL",
joinColumns=@JoinColumn(name="PRODPK"),
inverseJoinColumns=@JoinColumn(name="CATPK")
)
@Cascade({CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.SAVE_UPDATE, CascadeType.MERGE})
public Set<Category> getCategories() {
.....
}
When I use the HQL above, I get something like a SQL Gramma Exception.
But then I found this:
http://opensource.atlassian.com/project ... e/HHH-5126So I upgraded Hibernate core and entity manager to the latest version and everything's fine now.
Thanks!