Forums Register Login

How to use inner join with hql query

+Pie Number of slices to send: Send
I want to construct a hqlquery using hibernate.

I need join two tables, city and state, and one single table to use him to show in a data table in my JSF application, can anybody helpme construct a criteria or hqlquery to join my table

+Pie Number of slices to send: Send
HQL and SQL are very similar. What have you got so far?
+Pie Number of slices to send: Send
I already create a criteria to list my class



and i use this to show him in my xhtml file



it works, but now i want to mix two tables(using inner join or something) to show in my datatable
+Pie Number of slices to send: Send
Create a SQL or HQL query as you always do and try converting mapping the resultset values into your custom class.
Check Transformers.aliasToBean method. See if it helps.
Beware the other head of science - it bites! Nibble on this message:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2843 times.
Similar Threads
Retrieving the list of a "join table" in Many-to-Many Mapping using annotations
Pattern to retrieve data from multiple tables
left outer join
What is the best way of doing this?
How to handle this large result set
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:03:35.