• Post Reply Bookmark Topic Watch Topic
  • New Topic

Could not determine type for: java.util.Set

 
Mohammed Sardar.
Ranch Hand
Posts: 33
Eclipse IDE Java
  • 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: 36007
422
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: 33
Eclipse IDE Java
  • 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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!