I have a client, and a client has many partecipations. Every partecipation has a date.
I modelled it with a property set in client and property date in partecipation, and the 2 entity are connected by one-to-many (it is a set collection).
I want to obtain the whole list of clients ordered descently by the max partecipation date owned by its client.
In more simple words if the most recent partecipation of a client A is more recent that the most recent partecipation of client B, A has to appear before B in the resulting list.
Any idea for the HQL?
thanks
|