-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: basic question
PostPosted: Fri Jul 29, 2011 4:15 am 
Newbie

Joined: Fri Jul 29, 2011 1:06 am
Posts: 2
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 ";


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.