Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DiscriminatorColumn neither getting created or populated

 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have 2 entities, 'Principal' and 'Resource'. 'Principal' implements resource and has a 'Joined' inheritance strategy with resource. 'Resource' entity has a DiscriminatorColumn called 'RESOURCE_TYPE' while the 'Principal' entity has a discriminator value of 'PRINCIPAL'. Now the problem that I am facing is that the discriminator column is neither getting created not populated in the 'Resource' table when I create a 'Principal'. I am using jboss-5 with Hibernate as the persistence provider. Below is the source code.





I would really appreciate if you could help me out.
 
E Armitage
Rancher
Posts: 989
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
https://hibernate.onjira.com/browse/HHH-6911

You're stuck with using single table strategy if you want the discriminator column.
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E Armitage wrote:https://hibernate.onjira.com/browse/HHH-6911

You're stuck with using single table strategy if you want the discriminator column.


Thanks for sharing the information!
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!