• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Spring and Hibernate many to many table relationship error

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I would like to implement this relationship in Java Spring and Hibernate:



In my GnrlOrgChargeCode class, I have:


and in my OrgChargeCodeCond class, I have:


and in my BillingCondition class:

and in my OrgChargeCodeRule class:



and in my BillingRule class:


But when I startup Tomcat, I get this error:

Could not determine type for: java.util.Set, at table: ORG_CHARGE_CODE_COND, for columns: [org.hibernate.mapping.Column(billingCondition)]



My query is this:


Please help. thanks.
 
Saloon Keeper
Posts: 22790
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your actual Hibernate JPA query would be quite easy, since all the joins are automatic in JPA.

But you didn't actually define a @ManyToMany relationship on anything there.

I appreciate your attempting to keep the code samples short, but if you could display more of the entity class definitions of GNRL_ORG_CHARGE_CODE, the join table GNRL_CHARGE_CODE_COND and the BILLING_CONDITION class, it would help a lot.

The things I need to see are the class definition line and its annotations, the joining annotations and the class member definitions for those joining annotations.
 
Bartender
Posts: 1979
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This thread may be helpful https://stackoverflow.com/questions/6164123/org-hibernate-mappingexception-could-not-determine-type-for-java-util-set

Adding @ElementCollection for the list of billing collection may help.
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic