[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4412) bulk update with native sql queries
Didier Loiseau (JIRA)
noreply at atlassian.com
Thu Mar 29 11:09:49 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46119#comment-46119 ]
Didier Loiseau commented on HHH-4412:
-------------------------------------
Since this is supported by Hibernate Core, it would probably be as much simple to just implement this part of the JPA-1 spec, instead of changing the exception…
I also wanted to use this feature (for performing a native {{select count(…)}}) and I ended up using {{createNativeQuery}} instead…
Maybe the issue should be modified to have an "Affects Version" properly set, and remove the "Fixed Version" so that it appears more clearly in the Jira searches.
> bulk update with native sql queries
> -----------------------------------
>
> Key: HHH-4412
> URL: https://hibernate.onjira.com/browse/HHH-4412
> Project: Hibernate ORM
> Issue Type: Improvement
> Components: annotations
> Reporter: Steve Ebersole
> Priority: Critical
> Fix For: 3.5.x
>
>
> 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 HHH-2147 as an issue about Hibernate core! :(
--
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