[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1201?page=c...
]
Steve Ebersole closed HHH-1201.
-------------------------------
Closing stale resolved issues
Classic parser does not support DML style operations
----------------------------------------------------
Key: HHH-1201
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1201
Project: Hibernate Core
Issue Type: Bug
Environment: CVS HEAD
Reporter: Mathias Bogaert
Priority: Blocker
Exception in thread "Thread-134"
org.springframework.orm.hibernate3.HibernateQueryException: query must begin with SELECT
or FROM: delete [delete from UnarchivedSample u where u.CABLE_MODEM_SAMPLE_ID = :CM_ID];
nested exception is org.hibernate.QueryException: query must begin with SELECT or FROM:
delete [delete from UnarchivedSample u where u.CABLE_MODEM_SAMPLE_ID = :CM_ID]
org.hibernate.QueryException: query must begin with SELECT or FROM: delete [delete from
UnarchivedSample u where u.CABLE_MODEM_SAMPLE_ID = :CM_ID]
at org.hibernate.hql.classic.ClauseParser.token(ClauseParser.java:83)
at org.hibernate.hql.classic.PreprocessingParser.token(PreprocessingParser.java:108)
at org.hibernate.hql.classic.ParserHelper.parse(ParserHelper.java:28)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:178)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:154)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:74)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:53)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:108)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:88)
at
nl.nutsmaas.marvin.domain.persistence.hibernate.HibernateCableModemDao.archiveSamples(HibernateCableModemDao.java:195)
Code:
String hqlDelete = "delete from UnarchivedSample u where u.CABLE_MODEM_SAMPLE_ID =
:CM_ID";
int deletedEntities = getSessionFactory().getCurrentSession().createQuery( hqlDelete )
.setLong( ":CM_ID", cableModem.getId()).executeUpdate();
log.info("Deleted " + deletedEntities + " unarchived cable modem
samples");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira