Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapping Resource exception

 
Ajay Luthria
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do a many-to-many association using hibernate. I am having an
EVENT table and PERSON table. I am trying to get many-to-many association between these two tables using a junction table PERSON_EVENT. Following is the
mapping.

Error: An association from the table PERSON_EVENT refers to an unmapped class: Event

This is my first attempt at using many-to-many association and after reading paul sturrock's mail regarding case sensitivity,I still get this error.

Please guide where have I gone wrong?

Thanks





 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need to use fully qualified class names?

I'm wondering if it might be easier to put everything in one mapping file, rather than two?

I'm stronger on annotations than mapping files, so these are just kicks at the can.

-Cameron McKenzie
 
Vijitha Kumara
Bartender
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cameron Wallace McKenzie wrote:I'm wondering if it might be easier to put everything in one mapping file, rather than two?


Using separate mapping files is the prefered way, isn't it ?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the scope of the project. It's not a requirement.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic