Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Hibernate : Groups of Groups / IllegalArgumentException calling getter

Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm struggling to find out the proper way to represent the following relationship within hibernate :

I'd like to have, in effect, groups of groups and am using the MyGroupGroups table as a join table from MyGroup to tie back to the child groups.

MyGroup.hbm.xml (fragment) :

and within the childGroupGroups.hbm.xml I have the following :

When all is said and done I'm receiving a

Note : I did have to go through and manually replace the MyGroup / MyGroupGroups elements - please adjust your reading glasses accordingly as I may have misapplied some changes.
Craig Taylor
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Banging my head repeatdly against the issue resolved the problem :

Modifying the MyGroup.hbm.xml to reflect this, made it work.

Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic