• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@NamedQuery doubt......

 
Philip Zac
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,


I was wondering how to retrieve the data from the c_c having the Discriminator value call "P" or its child ID........


Parent class :





Child Class :



Thanks..

Philip
 
Rodrigo Lopes
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
having a reference to the EntityManager, and the id mapped as primary key:



As you're using the SINGLE_TABLE stategy, all properties of all super- and subclasses are mapped into the same table (c_c), instances are distinguished by the 'discriminator' column.

About inheritance mapping

Edited to add the URL
[ July 25, 2008: Message edited by: Rodrigo Lopes ]
 
Philip Zac
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Rodrigo Lopes,

That means it is impossible to do it in named Query???

Thanks for the help..

Philip
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic