-->
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.  [ 2 posts ] 
Author Message
 Post subject: sql-query where-clause won't budge
PostPosted: Tue Feb 23, 2010 1:03 pm 
Beginner
Beginner

Joined: Fri Jul 20, 2007 10:38 am
Posts: 49
I'm quite stunned: I'm using a named-query that includes a where-clause giving me no results. When I manually run the same query against the Oracle database, I'm getting results (records). I'm doing tests on an in-memory database, gives me results.
The query looks like:
<sql-query......>
SELECT ....
FROM table1 t1
INNER JOIN table2 t2 etc
WHERE t1.field = t2.field
</sql-query>
When I remove the where-clause, I'm getting data.

I don't believe WHERE is broken, but what is?


Top
 Profile  
 
 Post subject: Re: sql-query where-clause won't budge
PostPosted: Tue Feb 23, 2010 3:10 pm 
Beginner
Beginner

Joined: Tue Aug 25, 2009 11:42 am
Posts: 49
It's difficult to answer your question because there's very little detail. Can u divulge a bit more ?
minimal mapping file and what entities u saved

lastly the fact that the query without the 'where-clause' works means maybe u were expecting a left join and not an inner join in the first place.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.