Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

onetomany and manytoone Object Mapping..Help..  RSS feed

 
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: 17309
11
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!