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

Could not determine type for: java.util.Set  RSS feed

 
Mohammed Sardar.
Ranch Hand
Posts: 181
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends

Greetings. I'm trying to insert a collection object into Oracle database through a Java Object by Hibernate ORM. The collection object is an Embedded object. A class called Address is @Embeddable Object. Below are the sample snippet of code. I searched on Net to fix this issue but struck with many findings. I'm getting the below Exception when trying to use collection. If anyone has any idea please help me. Thanks.


Initial SessionFactory creation failed.org.hibernate.MappingException: Could not determine type for: java.util.Set, for columns: [org.hibernate.mapping.Column(listOfAddresses)]
Exception in thread "main" java.lang.ExceptionInInitializerError










 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37222
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How come you are using @ElementCollection instead of @OneToMany? The later is more precise. I think that's the cause of the problem here.
 
Mohammed Sardar.
Ranch Hand
Posts: 181
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. Learned through JavaBrains Online Tutorial.Did not hear anything about @OneToMany ? Is my explanation understandable ? May be because of hibernate version ? Please guide me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!