|
From: Sergey V. (JIRA) <no...@at...> - 2006-01-23 22:42:11
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=all ] Sergey Vladimirov updated HHH-870: ---------------------------------- Attachment: patch.txt Ok, this issue still affects Hibernate 3.1 More over, it is MAJOR issue for EntityManager, because one should not take connection() from EntityManager (according to EJB 3.0) I prepared patch this patch for my application. It seems to be working :) TODO: add SQL output to log. TODO: add (if needed) alias params handling. > support SQL updates in named queries > ------------------------------------ > > Key: HHH-870 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-870 > Project: Hibernate3 > Type: New Feature > Components: core > Environment: Hibernate 3.0.5, SQL Server 2000 > Reporter: Nathan Moon > Priority: Minor > Attachments: patch.txt > > > currently attempting to execute a named <sql-query> that is an update statement throws java.lang.UnsupportedOperationException: Update queries only supported through HQL. > In order to execute sql updates, the Session.connection() must be used directly. > (see forum topic http://forum.hibernate.org/viewtopic.php?t=940281) > It would be very nice to be able to be able to externalize SQL update statements and be able to run them with Session.getNamedQuery(). -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |