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

@ManyToOne mapping question

 
Matthew Snow
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a watered down version of my code (excuse and simple syntax errors).





The named query of the Employee entity works just fine, but when I try to create the named query for TimeEntry, I get this error:

java.sql.SQLException: ORA-00904: "TIMEENTRY0_"."EMPLOYEE_EMPLID": invalid identifier

I know this has to do with the annotations I use to map these two together. I've been playing around with different configuration, but I keep getting this error:

org.hibernate.MappingException: Repeated column in mapping for entity: egg.myapp.payroll.model.TimeEntry column: emplid (should be mapped with insert="false" update="false")

and I don't see how to define these attributes. I am in no way saying that the configuration I have is the best way to do this. Any help would be appreciated.
 
Matthew Snow
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Resolution

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic