Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

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: 11881
253
  • 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...
 
What are you doing? You are supposed to be reading this tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic