• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate

 
kiran medisetty
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a table called Temp_Fields. The table has 8 cols.
Two cols namely A,B makes a composite key which uniquely identifies a record in the table. Both A, B are numeric types

Application requirement is -

I want to get all the records from the Table Temp_Fields, where the COL A = 0.

I have done the following -

A. In the hibernate mapping file, created a composite key element with the above cols with mapping properites.

B. When i am using a hibernate query langage as follows
i starte it without select clause(assuming, it selects all cols from the table above
from temp_field t(which is a mapping class name for the table above)
where t.property for Col A = 0
order by t.propert for Col B..

When i do this, i am getting a hibernate grammer exception...

So,,,, please suggest how to run queries in hibernate language using a partial key in the where clause....

thanks
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be a good start to show us some code, your mappings or the relevant parts of it as well as the exception stacktrace! (and then a better title for your question would not hurt since nearly all questions in this forum are about hibernate)

pascal
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!