This seems to be a big problem for me.
How does HQL support inheritence and criteria on the subclass.
The entity can be a business or a individual
Entity
Business : Entity
Individual : Entity
The Entity plays one or many roles, one being a Client ( a bag)
Client inherits from Role
(Client : Role)
The client then has applications from there. (bag)
Say I took my original problem and decided to return Businesses instead of Entities. I can set criteria ok on the Businesses however i need to be able to search all Clients that match this role that the entity is playing, and then search the associated applications.
Ive done a lot of reading, and searching, to no prevail. (equivalient of Hibernate 2.1 i believe).
It is a comples scenario but posts like this from Gavin on the HIBERNATE forum do not sound promising : (referring to 2.1)
"HQL never, ever supported navigating through a collection-valued association! I find it very difficult to believe that this ever worked, but if it did, it worked by accident in some small number of cases and was never part of the official definition of HQL as per the documentation."
can someone confirm if what i am attempting can be done please??
|