The following query to return the attribute "address" that is a collection or an array throws an exception.
select r.Id, r.address from Foo r where r.Id in (:ids) order by r.Id
org.hibernate.QueryException: not an entity [select r.Id, r.address from com.cisco.nm.model.enum.Foo r where r.Id in (:ids) order by r.Id]
You just want a better error message? What you are trying is not valid syntax. I think what you want is:
select r.Id, elements( r.address ) from Foo r where r.Id in (:ids) order by r.Id
Well I think what you really want is to get back a list of [id, array] pairs which is totally not supported...
I wanted to know how to query a collection.
Hibernate support team said there is no option and asked me to ask for this enhancement.
you can close this. thanks.
Based on comments, closing.