database - Hibernate - my table is not mapped -


i want make simple query getvaluebylabel method:

here code:

public config getvaluebylabel(string label) throws entitypersistexception{      try {         query query = em.createquery("select id config config_label=:label",long.class);         query.setparameter("label", label);         list<long> config = query.getresultlist();          return em.getreference(config.class, config.get(0));     } ... 

when want start method get:

org.hibernate.hql.internal.ast.querysyntaxexception: config not mapped [select id config config_label=:label] 

any ideas how fix that?

update

i using:

hibernate 4.0.1.final , postgresql db 1.16.1

syntax of hql case sensitive. please see if table/entity , column/instance variable names used in query same of object.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -