I have a very simple model consisting of Forum, Threads and Posts. A Forum can have multiple Threads and a Thread can have multiple Posts. I have everything setup.
Now I need to write a query to get me the following:
Forum Name, Forum Description, Number of Threads in the Forum, Number of Posts in the Forum and the Time when the last post was made on that Forum.
I can write this query in SQL easily but am stuck in HQL. Can anyone help out with how this query can be written, please bear with me as I am still learning.
|