hibernate - I know how it looks in SQL, but I need it in HQL and am stuck -
hibernate - I know how it looks in SQL, but I need it in HQL and am stuck -
consider have such sql query:
select t1.* table1 t1 left bring together table2 t2 on t1.table2_id = t2.id t2.value = 'something' or t1.value = 'something';
i need same thing done in hql query. more info: have classes table1 , table2 both having field named value , table1 having field table2 of class table2. want list of table1 objects have value or it's fellow member table2 has value , know table2 field might null.
i have tried formulate question without trying explain every single way tried without success. sorry if not clear.
based on description of problem in question, assume have parent class table1 , kid class table2. table1 has fellow member table2 of type table2. in case, believe, appropriate hql should this:
from table1 t1 t1.value = 'something' or t1.table2.value = 'something'
sql hibernate hql
Comments
Post a Comment