• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem while writing Named Native Query

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have a plugin for Eclipse and generated 2 classes from Reverse Engineering.I am having primary key in database table which consist of 2 columns.

Now in my first class which is generated in that all configuration is done properly like:


Now as i am having primay key is a combination of 2 columns column B and Column C , so following code is been written for that:


So the above 2 fields b and c are defined in seprate class with annotation @Embeddable.

Now my question is that i want to write a named native query @NamedNativeQuery. How to write the query as the variable c is present in one class and variable b and c are in different class that serve as for the combination primary key.

Thanks
Ram
 
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why don't you try some query , starting with a simple "select * ..."?
There is some chance that you'll get what you need.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic