• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems mapping entities of single_table inheritance...  RSS feed

Bin Smith
Ranch Hand
Posts: 514
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I use hibernate 4. I use single_table inheriatnce strategy for entities JuniorUser extended by ExpertUser. It is mapped to Answer entity with type JuniorUser.

When I call this getter I have hibernate proxy of JuniorUser retrieved. I can cast this proxy to type JuniorUser but I can't cast it to ExpertUser. Therefore I can't access properties specific to ExpertUser! Trying to cast proxy to ExpertUser I received error ClassCastException.
How can I retrieve properties specific to ExpertUser having hibernate proxy Of JuniorUser?

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