Hello.
I am pretty new to Hibernate and have some problems with a HQL query.
I have persisted some objects, which have a structure like this:
class Document:
long id
List<String> tags
Now I want to query all tags of all documents.
It isn't important if the result is a list of lists or all tags together in one list.
An easy query like "doc.tags from Document as doc", doesn't solve the problem. I get an exception, that tags is not an entity.
The data is there. All in a document_tags table. A normal SQL query would be easy, but how do I fetch it with HQL? Can someone help me out?
|