Exceção de Hibernate e Unexpected end of Subtree
Eu sou um novato no Hibernate.
eu tenho umItem
POJO que contém umSet<String>
consistindo de rótulos. As etiquetas estão contidas em outra tabela do banco de dados doItem
tabela, então eu faço uma junção para preencher o pojo.
Eu estou tentando executar uma consulta de exemplo simples do livro "Java Persistance with Hibernate" onde eu consultarfrom Item item where 'hello' member of item.labels
. Só que, por algum motivo, estou recebendo
`org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree[from /*qualified class path*/.Item item where 'hello' member of item.labels]`
O que pode estar causando esse problema?
Aqui estão meus POJOs:
public class Item
private int uuid;
private Set<String>labels = new HashSet<String>();
@Id
public int getUuid(){
return uuid;
}
@CollectionOfElements
@JoinTable(name="labels", joinColumns=@JoinColumn(name="uuid"))
@Column(name="label")
public Set<String> getLabels(){
return labels;
}
}