-->
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.  [ 5 posts ] 
Author Message
 Post subject: UNION and Hibernate
PostPosted: Wed Mar 10, 2004 12:03 pm 
Beginner
Beginner

Joined: Tue Nov 18, 2003 10:16 am
Posts: 33
Location: Cluj-Napoca, Romania
I am trying to use UNION from Hibernate using createQuery() method.
It seems that the result is unpredictable.

Is there any way in using this feature from HIBERNATE??


Top
 Profile  
 
 Post subject: Re: UNION and Hibernate
PostPosted: Wed Mar 10, 2004 1:16 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
florinmarcus wrote:
I am trying to use UNION from Hibernate using createQuery() method.
It seems that the result is unpredictable.

Is there any way in using this feature from HIBERNATE??


Yes, it is. Just use View.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 2:07 pm 
Beginner
Beginner

Joined: Tue Nov 18, 2003 10:16 am
Posts: 33
Location: Cluj-Napoca, Romania
Yes, indeed, but I am using Mysql and views will be implemented somewhere in the 5 version.

Maybe, for complicated query I should stick to JDBC..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 2:55 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
florinmarcus wrote:
Yes, indeed, but I am using Mysql and views will be implemented somewhere in the 5 version.

Maybe, for complicated query I should stick to JDBC..


It is out of topic, but why do you use advanced tools like hibernate for toys like mysql ? There are a few open source real RDMS implementations: PostgreSQL, SAPDB, Firebird.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 6:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You should use createSQLQuery(), not createQuery(). What do you need a union for?


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

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.