From: <leg...@at...> - 2003-12-27 17:43:43
|
Message: The following issue has been closed. Resolver: Max Rydahl Andersen Date: Sat, 27 Dec 2003 11:42 AM duplicate af HB-484 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-583 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-583 Summary: Subclass.java and MSSQL JDBC driver cause a reread exception. Type: Bug Status: Closed Priority: Minor Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.1.1 Assignee: Reporter: Eric Pugh Created: Sat, 27 Dec 2003 11:25 AM Updated: Sat, 27 Dec 2003 11:42 AM Environment: Hibernate 2.1.1 and also the nightly build. Using MS JDBC driver, both the Service Pack 1 and Service Pack 2 versions. Description: Per my forum posting about MSSQL Throwing "ResultSet can not re-read row data for column 51.". The MSSQL JDBC Driver throws an exception if you don't read left to right if you are quering columns that contain types IMAGE, NTEXT, or TEXT. According to the JDBC API this actually okay: For maximum portability, columns within a row should be read in left-to-right order, and each column should only be read once. This reflects implementation limitations in some underlying database protocols The way around this is to use proxies and lazy loading to not load all the objects at once. However, for joined-subclasses you have to. The fix is to swap the order of the propertys are read in Subclass.java: public Iterator getPropertyClosureIterator() { return new JoinedIterator( new Iterator[] { getSuperclass().getPropertyClosureIterator(), getPropertyIterator()} ); } However, I think that a better approch (but beyond me) is to use indexes instead of columns names. Which I also believe is supposed to be faster for most JDBC drivers. Eric Pugh --------------------------------------------------------------------- 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 |