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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -