[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2655) SQLServer2005Dialect (ROW_NUMBER for Paging)
Mazda Fahandezh Saadi (JIRA)
noreply at atlassian.com
Tue Nov 2 07:51:07 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38978#action_38978 ]
Mazda Fahandezh Saadi commented on HHH-2655:
--------------------------------------------
unfortunately there was 2 Bugs in the last implementation. I have just fixed them and add the new File as Attachment.
The First Bug was at the Statements
this.registerColumnType(Types.VARCHAR, 1073741823, "NVARCHAR(MAX)");
this.registerColumnType(Types.VARCHAR, 2147483647, "VARCHAR(MAX)");
this.registerColumnType(Types.VARBINARY, 2147483647, "VARBINARY(MAX)");
in Constructor of the Class. They caused Hibernate to create Field with type String as NVARCHAR in MSSQL and ignored Length of the Column. It is only a problem if you want to create a index for this column. MSSQL can't create Index for columns with such a type. therefor i added this.registerColumnType(Types.VARCHAR, 8000, "VARCHAR($l)"); to the constructor.
The Second Bug was, how the Sqlstring was parsed to find "select" or "select distinct". The sqlstatement was not correct if the property hibernate.use_sql_comments is true. In this case there is a comment at the beginning of the statement and this was not parsed correctly.
> SQLServer2005Dialect (ROW_NUMBER for Paging)
> --------------------------------------------
>
> Key: HHH-2655
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2655
> Project: Hibernate Core
> Issue Type: New Feature
> Components: core
> Affects Versions: 3.2.2, 3.2.3, 3.2.4, 3.5.3
> Environment: SQLServer 2005, Hibernate 3.2.2+
> Reporter: Wells Tiedeman
> Assignee: Strong Liu
> Fix For: 3.6.1, 4.0.0.Alpha1
>
> Attachments: BindingSqlServerDialect.java, SQLServer2005Dialect.java, SQLServer2005Dialect.java, SQLServer2005Dialect.java, SQLServer2005Dialect.java, SqlServer2008Dialect.java, SqlServer2008Dialect.java, SqlServer2008Dialect.java
>
> Original Estimate: 1m
> Remaining Estimate: 1m
>
> Add a SQLServer2005Dialect class to the product that leverages the new ROW_NUMBER capabilities within SQLServer2005 to do paged result sets more efficiently. See attached source...
--
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