Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onetomany and manytoone Object Mapping..Help..

 
Prav Chau
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have a below schema. I am trying to save the job and jobdetails object but for some reason not able to populate the jobdetails table. Can someone please help me !!

Job and Jobdetails are one to many relationship

Table1
Job
jobid (PK)
name

Table2
[JobDetail
jobid (FK)
taskid (FK)
jobdetailmessage

Table3
taskid(PK)
taskdesc




Above code doesnt insert values in jobdetails table.can someone create object mapping for me. I created one to many relationship between job and jobdetails but not able to store values automatically while calling save hibernate method with job as object.



Thanks in advance





 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aren't the annotation classes with Capital letters like

instead of @onetomany

it is @OneToMany

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic