Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Help with a query

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can anyone help me to write this query using the Criteria API, please?

 
Saloon Keeper
Posts: 12303
259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

Sorry, that's not really how this site works. First show us what you've tried, and then tell us what you're stuck on. We'll then advise you on how to continue.
 
Davide Gp
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Welcome to CodeRanch!

Sorry, that's not really how this site works. First show us what you've tried, and then tell us what you're stuck on. We'll then advise you on how to continue.



Hi Stephan, sorry about that, I did not want to make my initial question too long and polluted... I currently have (note that this is slightly different from the above query, but the result and the problem is the same):



The problem, in my opinion, is that in the WHERE clause created I have:



In other words, the generated WHERE clause does not have parenthesis around the first_clause_with_subquery and therefore the logic of the query is changed. I am essentially looking for a way to add parenthesis like in the initial posted query...
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic