• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

polymorphic collections with concrete classes

 
Vidyasagar Guduru
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- I have a entity C which holds set of objects of R
- We defined a new entity S which extends R
- we are using hibernate xml mapping, so S is mapped in R's hbm definition as joined-sub class (We don't want to use descriminator because it will affect the current R usage)
- I want to create a new Set of S in C, but I am unable to map S as a set in C's hbm config file, there is no reference of C in S and with out the 'key' column I can not map relation ship between C and S

Please help me how to solve this (We don't want to use the instance of or type casting from main R collections)
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... there is no reference of C in S and with out the...

So you want to keep both S & R references in the C? What's the point?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic