[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4017) you can not generate "update top 10 Table_name" sql query with query.executeUpdate
Parisa Kachoui (JIRA)
noreply at atlassian.com
Mon Jul 6 07:54:11 EDT 2009
you can not generate "update top 10 Table_name" sql query with query.executeUpdate
---------------------------------------------------------------------------------------
Key: HHH-4017
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4017
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.2
Environment: hibernate-distribution-3.3.2.GA , SQL Server 2005
Reporter: Parisa Kachoui
The query.executeUpdate ignores the query.setMaxResult(10) .
for example if you have this query :
Query query = session.createQuery("update table_name t set t.fieldname= ?)
query.setString(0, fieldValue);
query.setMaxResults(10);
int i = query.executeUpdate();
it generates "update table_name set fieldName := fieldValue" sql query instead of this query "update top 10 table_name set fieldName := fieldValue"
so now way you can't have top 10 records in update query
--
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
More information about the hibernate-issues
mailing list