-->
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: Coding the equivalent of an SQL Exception Join
PostPosted: Mon Jan 31, 2005 11:46 am 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
Hibernate version 2.1.7

I have two objects, and Application and a Queue

An Application can be on a Queue (i.e. an Application object has an instance of Queue on it), or not (the Queue is null on it).

I have a mapping files that link Queue to Application and vice versa

I want to do a hibernate query that counts how many Applications there are that are not on a Queue.

In SQL this is done by an EXCEPTION JOIN, e.g.

select count(*) from applicat ap exception join queue q on ap.appid = q.appid

How do I do this in Hibernate ?

(I'd post the mapping files but they are pretty big and it's more of a general question than one specific to my application), the relvant portiion of the Application one is here:

<one-to-one name="queueEntry" class="net.targetgroup.broker.queue.QueueEntry" outer-join="auto" cascade="all" />

_________________
On the information super B road


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.