• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to Join tables in Hibernate Spring in java  RSS feed

 
junaid paracha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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...

Thanks
I will be really greatful if you can help me with that as i am struggling for last 3 days for it .
thanks
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our ORM forum.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!