We're updating the issue view to help you get more done. 

bulk update with native sql queries

Description

Hibernate Annotations 3.2 does not support bulk update/deletes using native queries,

if I have something like:

@NamedNativeQuery(name = "testQuery", query = "delete from tb_test where id = ?")

in one of my entities, there will be following exception during build of SessionFactory :

Exception in thread "main" org.hibernate.cfg.NotYetImplementedException: Pure native scalar queries are not yet supported
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(QueryBinder.java:118)
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQueries(QueryBinder.java:197)
at org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBinder.java:281)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:404)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:452)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:268)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210)

------
I made a mistake and I reported this issue as as an issue about Hibernate core!

Environment

None

Status

Assignee

Brett Meyer

Reporter

Steve Ebersole

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Critical