I need to use UNION in hql such as follows in SSH. However, hql does not support union. In Oracle ADF, I can create View Object based on Entity Object. Can I do similar things using Hibernate? If I can , how to do that? Second, in Hibernate, can I create eo without database table? I mean I create an eo using java or html, but not from database tables. Third, is there any tutorial about how to insert/update/delete database data in more than one table using hibernate? I can find samples which can delete/update/insert data to one database table. But I need to do delete/update/insert on many tables at the same time using SSH. I don't want to use very long hql in this case. ------------------------------------------------------------------------------------------------------------------ "select new com.website.service.model.vo.PicVO(h.hisid, h.hisname, t.filename, h.hisdesc) " + " from Trvlhistory h, Trvlcustom trvlcustom , Trvlres t "+ " where h.hisid = trvlcustom.trvlhistory.hisid and t.trvlrestype.typecode = 'Custom' and t.targetid=h.hisid "; + " union "+ " select new com.website.service.model.vo.PicVO(h.hisid, h.hisname, t.filename, h.hisdesc) "+ " from Trvlhistory h, Trvlfestival trvlfestival , com.sunz.website.service.model.eo.Trvlres t "+ " where h.hisid = trvlfestival.trvlhistory.hisid and t.trvlrestype.typecode = 'Festival' and t.targetid=h.hisid ";
|