hibernate - How to do a simple table join in Grails -
i'm kind of new grails , i'm having lot of trouble joining 2 existing tables through domain objects have been created off of tables. know how in grails? here tables , example of how need joined table look. in advance help.
table1{ field1table1 } table2{ field1table2 field2table2 }
i need join these 2 tables field1table1 = field1table2 , resulting table join need this:
joinedtable{ field1table1 field2table2 }
if domains not have relationship (hasone, hasmany, etc) can use executequery execute hql queries :
table1.executequery("select * table1 t1,table2 t2 t1.field1table1 = t2.field2table2")
look @ doc
hope helps
Comments
Post a Comment