Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic