Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Duplicate collection role mapping

 
Ashish Yannam
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to map two tables having one-many relationship.


This is my mapping file for the "one side";

I am getting the following exception



can anyone please help
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might be one possible reason.
 
Ashish Yannam
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building a standalone application using eclipse.

can you help me with that.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that you have used the Cooks class twice somewhere, or even more likely, you have two mapping files for the Cooks class. Check for duplicate entries in your hibernate configuration file.

Show us your mappings element of the configuration file if you're still having problems.

-Cameron McKenzie
 
Ashish Yannam
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am putting up the mapping files here for Customer and the Book
I want a one to many relationship between the Customer and Book.

 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are we talking about cooks or books?

-Cameron McKenzie
 
Ashish Yannam
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was an typing mistake there.
The name of the set is books, and am having getter and setter methods in the Customer class as
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic