• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.hibernate.MappingException: Could not determine type for...

 
Phoenix Kilimba
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sirs et Madames,
I have an exception which I am not too familiar with and I was hoping I could get some expert opinions here. I have a class as shown below:


My hbm.xml file is as such:


However, when I try running a JUnit test I get the following error:



What could possibly be the problem?
Thanks in advance,
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your user defined type return a valid SQL type from its sqlTypes() method?
 
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
So, we're mapping a self-referencing property here with Hibernate?

-Cameron McKenzie
 
Phoenix Kilimba
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
@Cameron, yes it is a self referencing property (a location can have many child locations i.e sublocations, and many locations can have 1 parent location)
@Paul, I had no idea there was more to this, how DO I define a user defined type?

Thanks again guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic