Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
2.1.8
Mapping documents:
<class name="es.cyii.formuWeb.model.Contact" table="CONTACTS">
<id name="IdContact" type="integer">
<column name="IDCONTACT"/>
<generator class="sequence">
<param name="sequence">SEQ_CONTACTS</param>
</generator>
</id>
...
<property name="Answered" type="true_false">
<column name="ANSWERED"/>
</property>
...
Code between sessionFactory.openSession() and session.close():
sSQL = "from Contact as ta where not ta.Answered";
results = getHibernateTemplate().find(sSQL);
Exception
javax.servlet.ServletException: Incorrect query syntax [from es.cyii.formuWeb.model.Contact as ta where not ta.Answered]; nested exception is net.sf.hibernate.QueryException: Incorrect query syntax [from es.cyii.formuWeb.model.Contact as ta where not ta.Answered]
Name and version of the database you are using:
Oracle 8.1.6
The generated SQL (show_sql=true):
This is the error I have, I think the syntax is correct, I have try too with
ta.Anwered == true and obtain an error too.
Thanks