reset password
Author Message
pratyush
Posts: 6
Posted 19:31 Nov 05, 2009 |

Hi

 

I  m  getting an error 

org.hibernate.hql.ast.QuerySyntaxException: OnlineAssignment is not mapped [from OnlineAssignment order by id]

i have checked my mapping classes including spring-data.xml and spring-servlet.xml 

I cant figure out where the problem is ?

 

jgreen
Posts: 23
Posted 19:40 Nov 05, 2009 |

I had this error for a while too.  Check and make sure that your HQL statement is asking from the class name, not the table name. 

For example, "from Assignment where name=?", even though the table is called assignments, the class is Assignment so that is what you use.

Hope that helps!

pratyush
Posts: 6
Posted 19:46 Nov 05, 2009 |

Hi !

I did used the class name in the query but its still showing the error !!

cysun
Posts: 2935
Posted 20:43 Nov 05, 2009 |

Check if you added the mapping file to hibernate.cfg.xml.

jaideo
Posts: 2
Posted 21:03 Nov 05, 2009 |
cysun wrote:

Check if you added the mapping file to hibernate.cfg.xml.

 

Hi,

I am facing the same problem. I checked the mapping in hibernate.cfg.xml, it is done still giving me same error.