aspose file tools*
The moose likes Object Relational Mapping and the fly likes Mapping Resource exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Mapping Resource exception" Watch "Mapping Resource exception" New topic
Author

Mapping Resource exception

Ajay Luthria
Greenhorn

Joined: Jul 15, 2009
Posts: 5
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

Joined: Aug 26, 2006
Posts: 4968
    
    1

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

Joined: Mar 24, 2008
Posts: 3775

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 ?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

It depends on the scope of the project. It's not a requirement.

-Cameron McKenzie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mapping Resource exception
 
Similar Threads
Mapping Exception
Question on Unidirectional Association
HIBERNATE hql.ast.QuerySyntaxException: (table name) is not mapped
Repeated updates on EVENT table, in Hibernate one to many mapping
inverse=true in many-to-many doubt