|
From: <no...@at...> - 2005-08-16 20:16:19
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-870 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-870 Summary: support SQL updates in named queries Type: New Feature Status: Unassigned Priority: Minor Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Assignee: Reporter: Nathan Moon Created: Tue, 16 Aug 2005 3:15 PM Updated: Tue, 16 Aug 2005 3:15 PM Environment: Hibernate 3.0.5, SQL Server 2000 Description: 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(). --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
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 |
|
From: Emmanuel B. (JIRA) <no...@at...> - 2006-01-23 22:56:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_21758 ] Emmanuel Bernard commented on HHH-870: -------------------------------------- Hum, I've opened a similar case, there is a dupe somewhere. I'll discuss the HEM issue sometimes this week with Steve and all. > 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 |
|
From: Sergey V. (JIRA) <no...@at...> - 2006-02-12 02:41:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_22131 ] Sergey Vladimirov commented on HHH-870: --------------------------------------- hmm... it seems there is a error with connection using (in patch). Connection is not closed even with aggresive release mode. > 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 |
|
From: Barthel S. (JIRA) <no...@at...> - 2006-02-22 19:32:50
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_22291 ] Barthel Steckemetz commented on HHH-870: ---------------------------------------- The patch works for us. In addition SQL-Logging should be supported in NativeSQLQueryPlan e.g.like this: private String format(SessionImplementor session, String sql) { if ( session.getFactory().getSettings().isFormatSqlEnabled() ) { return new Formatter(sql).format(); } else { return sql; } } public int performExecuteUpdate(QueryParameters queryParameters, SessionImplementor session) throws HibernateException { if (log.isTraceEnabled()) { log.trace("executeUpdate: " + getSourceQuery()); queryParameters.traceParameters(session.getFactory()); } if ( session.getFactory().getSettings().isShowSqlEnabled() ) { System.out.println( "Hibernate: " + format(session, getSourceQuery()) ); } int result = 0; try { Connection connection = session.connection(); try { PreparedStatement ps = connection .prepareStatement(this.sourceQuery); try { Type[] types = queryParameters .getPositionalParameterTypes(); Object[] values = queryParameters .getPositionalParameterValues(); for (int i = 0; i < types.length; i++) { types[i].nullSafeSet(ps, values[i], i + 1, session); } result = ps.executeUpdate(); } finally { ps.close(); } } finally { connection.close(); } } catch (SQLException sqle) { throw JDBCExceptionHelper.convert(session.getFactory() .getSQLExceptionConverter(), sqle, "could not execute update query", this.sourceQuery); } return result; } > 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 |
|
From: Barthel S. (JIRA) <no...@at...> - 2006-02-23 22:20:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_22309 ] Barthel Steckemetz commented on HHH-870: ---------------------------------------- Another point: jdbc-Batching does not work here. Perhaps we should use the Batchers (BatchingBatcher) in NativeSQLQueryPlan. > 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 |
|
From: Sergey V. (JIRA) <no...@at...> - 2006-02-24 01:20:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_22316 ] Sergey Vladimirov commented on HHH-870: --------------------------------------- I'm not sure that it is possible to use batchers here. We only have one sql, what to batch? And, we need to clear all caches after every sql. We can't allow hql to be executed after sql in batch mode. > 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 |
|
From: Barthel S. (JIRA) <no...@at...> - 2006-03-16 15:38:30
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=all ] Barthel Steckemetz updated HHH-870: ----------------------------------- Attachment: NativeSQLQueryPlan_withNamedParameters.java.txt > 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: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Barthel S. (JIRA) <no...@at...> - 2006-03-16 15:38:35
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_22507 ] Barthel Steckemetz commented on HHH-870: ---------------------------------------- I am attaching a new version of NativeSQLQueryPlan.java which supports Named Parameters. I took the new methods from CustomLoader and Loader. > 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: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Steve E. (JIRA) <no...@at...> - 2006-03-29 03:16:20
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=all ] Steve Ebersole reassigned HHH-870: ---------------------------------- Assign To: Steve Ebersole > 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 > Assignee: Steve Ebersole > Priority: Minor > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Max R. A. (JIRA) <no...@at...> - 2006-05-05 17:14:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=all ] Max Rydahl Andersen reassigned HHH-870: --------------------------------------- Assign To: Max Rydahl Andersen (was: Steve Ebersole) > 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 > Assignee: Max Rydahl Andersen > Priority: Minor > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Max R. A. (JIRA) <no...@at...> - 2006-05-05 20:32:30
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=all ] Max Rydahl Andersen closed HHH-870: ----------------------------------- Fix Version: 3.2.0 Resolution: Fixed this is now done. Remember to specify <synchronize table="xxx"> to have 2nd lvl cache cleared correctly. > 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 > Assignee: Max Rydahl Andersen > Priority: Minor > Fix For: 3.2.0 > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Max R. A. (JIRA) <no...@at...> - 2006-05-05 20:53:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_23024 ] Max Rydahl Andersen commented on HHH-870: ----------------------------------------- addendum: I just updated it so if no <synchronize> is specified (e.g. via standard EJB3) then *ALL* entities/collections will be evicted region by region. Let me know if you consider that a bad default. > 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 > Assignee: Max Rydahl Andersen > Priority: Minor > Fix For: 3.2.0 > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-05 23:49:24
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_23025 ] Emmanuel Bernard commented on HHH-870: -------------------------------------- you mean second level cache eviction? What would be the impact on a clustered/transactional cache? > 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 > Assignee: Max Rydahl Andersen > Priority: Minor > Fix For: 3.2.0 > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Max R. A. (JIRA) <no...@at...> - 2006-05-06 07:09:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_23026 ] Max Rydahl Andersen commented on HHH-870: ----------------------------------------- yes 2nd level cache eviction. It is the exact same code/behavior that happens when you use hql bulk manipulation - only difference is that we actually always know which entities/collections that are affected. I'm just curious on what the spec says regarding such issues. Should we just let the user shoot him self when doing native sql updates through hibernate and only help him if he uses <synchronize> which AFAIK is not possible via ejb3. > 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 > Assignee: Max Rydahl Andersen > Priority: Minor > Fix For: 3.2.0.cr2 > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Sergey V. (JIRA) <no...@at...> - 2006-05-06 10:00:26
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_23028 ] Sergey Vladimirov commented on HHH-870: --------------------------------------- Max, I'm sure you need to make it an optional. For example, my application knwo when to clear caches, and when just remove one entity from the cache. So, please, make an option to disable clearing all caches. But clearing all caches should be default behavior for sql update queries, IMO. > 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 > Assignee: Max Rydahl Andersen > Priority: Minor > Fix For: 3.2.0.cr2 > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |
|
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-06 16:32:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-870?page=comments#action_23032 ] Emmanuel Bernard commented on HHH-870: -------------------------------------- The spec is silent, it does not covers process or clustered cache. > 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 > Assignee: Max Rydahl Andersen > Priority: Minor > Fix For: 3.2.0.cr2 > Attachments: NativeSQLQueryPlan_withNamedParameters.java.txt, 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 |