Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

@NamedQuery doubt......

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rodrigo Lopes,

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

Thanks for the help..

Philip
 
reply
    Bookmark Topic Watch Topic
  • New Topic