• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem while writing Named Native Query

 
Ram Suryanshi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic