[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-7192) NullPointerException in QueryTranslatorImpl on erroneously typed delete query
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Mar 20 19:53:48 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-7192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole updated HHH-7192:
--------------------------------
Fix Version/s: 4.1.2
Assignee: Steve Ebersole
> NullPointerException in QueryTranslatorImpl on erroneously typed delete query
> -----------------------------------------------------------------------------
>
> Key: HHH-7192
> URL: https://hibernate.onjira.com/browse/HHH-7192
> Project: Hibernate ORM
> Issue Type: Bug
> Components: query-hql
> Affects Versions: 4.1.0, 4.1.1
> Environment: Hibernate 4.1.1 (also affects 4.1.0), Postgresql
> Reporter: Alex Cruise
> Assignee: Steve Ebersole
> Fix For: 4.1.2
>
>
> Calling code:
> val deleteFileQuery = "delete from FileInstanceEntity f where f.uri = 'file:/blah.txt'"
> em.getTransaction.begin()
> val q = em.createQuery(deleteFileQuery, classOf[FileInstanceEntity]) // FYI classOf[Foo] is the Scala equivalent of Java's Foo.class --
> // and it's the presence of this parameter that causes problems
> q.executeUpdate()
> em.getTransaction.commit()
> Stack trace:
> Exception in thread "main" java.lang.NullPointerException
> at org.hibernate.hql.internal.ast.QueryTranslatorImpl.getDynamicInstantiationResultType(QueryTranslatorImpl.java:571)
> at org.hibernate.engine.query.spi.HQLQueryPlan.getDynamicInstantiationResultType(HQLQueryPlan.java:340)
> at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:313)
> at com.example.JpaEntityTest$.main(JpaEntityTest.scala:178)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list