Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to Join tables in Hibernate Spring in java

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need l little favor ,could you help me or point for any article related to join ,ManytoMany/one to many with annotations
I want to join 2 tables in mysql with Hibernate Annotations and Criteria
Like for example
I have 2 table
candidates jobs
candID candName jobID jobName
1 abc 1 job1
2 xyz 2 job2

like i need to create a query in Criteria in hibernate as select candName ,jobName from candidates as c ,jobs as j where c.candID = j.jobID..

what will be the criteria query for that and most importantly what will i write in my annotation class ( as i am using spring annotations) and do i need to write anything in my applicantioncontext.xml...

I will be really greatful if you can help me with that as i am struggling for last 3 days for it .
Posts: 21972
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our ORM forum.
    Bookmark Topic Watch Topic
  • New Topic