Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate : Groups of Groups / IllegalArgumentException calling getter  RSS feed

 
Craig Taylor
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.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!