• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How To retrive data using Hibernate

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I want to write the following Query By using findByCriteria(Detached Criteria) to get the data
using Hibernate

"select a.organization_id From JCTS_PROJECT_INV a,JCTS_PROJECT c
where a.PROJECT_ID=c.PROJECT_ID and c.CUSTOMER_ID=4003640"

Please Help me .
Thanks & regards
Pradyumna



 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the ORM forum.

Mark
 
Ranch Hand
Posts: 33
Google Web Toolkit Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

List cats = sess.createCriteria(JCTS_PROJECT_INV .class)
.add( Restrictions.eq("CUSTOMER_ID", "4003640") )
.setFetchMode("JCTS_PROJECT ", FetchMode.EAGER)
.list();

i think this will help you. it will prepare the outer join query for JCTS_PROJECT_INV AND JCTS_PROJECT class.



 
What does a metric clock look like? I bet it is nothing like this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic