You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <leg...@at...> - 2003-12-06 02:04:41
|
The following comment has been added to this issue: Author: Gavin King Created: Fri, 5 Dec 2003 8:04 PM Body: I do not understand what you are trying to say here.... no object should ever have a null id at flush time.... The only case you could get an NPE in checkId() is if the EntityEntry in the session had a null id. How could that happen?? --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-528 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-528 Summary: SessionImpl.checkId does not handle null IDs Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: Serge Knystautas Created: Fri, 5 Dec 2003 10:40 AM Updated: Fri, 5 Dec 2003 8:04 PM Environment: Hibernate 2.1 rc1 on Resin 2.1.8, Windows XP, Sun JDK 1.4.1, and SQL Server 2000. Description: I hit this problem with the following steps: 1. Create a class with a native ID generator (uses an Integer, but tried with in as well). 2. Instantiate that object, set some bean properties, call saveOrUpdate on this. Do not set a bean property for something that IS marked as not-null="true". This means it should fail to persist. 3. Call saveOrUpdate on the object, which should in theory generate a new ID and save it when session flushes. 4. When session flushes, you get a null pointer exception in net.sf.hibernate.impl.SessionImpl:2519 because id is null, because it couldn't save. The fix is to change that if comparison from ( !id.equals(oid)) to ((id == null && oid != null) || (id != null && !id.equals(oid)) ) With this in place, the checkId will now pass through cleanly (because id == oid == null), which I think is the correct behavior. The benefit is that instead of an unintelligible null pointer exception, it falls through and gives me the Flush not possible because a not-null value is null. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 16:42:42
|
The following comment has been added to this issue: Author: Serge Knystautas Created: Fri, 5 Dec 2003 10:41 AM Body: Sorry, typo in step 1... I tried with an 'int' as well, not an 'in' --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-528 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-528 Summary: SessionImpl.checkId does not handle null IDs Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: Serge Knystautas Created: Fri, 5 Dec 2003 10:40 AM Updated: Fri, 5 Dec 2003 10:41 AM Environment: Hibernate 2.1 rc1 on Resin 2.1.8, Windows XP, Sun JDK 1.4.1, and SQL Server 2000. Description: I hit this problem with the following steps: 1. Create a class with a native ID generator (uses an Integer, but tried with in as well). 2. Instantiate that object, set some bean properties, call saveOrUpdate on this. Do not set a bean property for something that IS marked as not-null="true". This means it should fail to persist. 3. Call saveOrUpdate on the object, which should in theory generate a new ID and save it when session flushes. 4. When session flushes, you get a null pointer exception in net.sf.hibernate.impl.SessionImpl:2519 because id is null, because it couldn't save. The fix is to change that if comparison from ( !id.equals(oid)) to ((id == null && oid != null) || (id != null && !id.equals(oid)) ) With this in place, the checkId will now pass through cleanly (because id == oid == null), which I think is the correct behavior. The benefit is that instead of an unintelligible null pointer exception, it falls through and gives me the Flush not possible because a not-null value is null. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 16:40:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-528 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-528 Summary: SessionImpl.checkId does not handle null IDs Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: Serge Knystautas Created: Fri, 5 Dec 2003 10:40 AM Updated: Fri, 5 Dec 2003 10:40 AM Environment: Hibernate 2.1 rc1 on Resin 2.1.8, Windows XP, Sun JDK 1.4.1, and SQL Server 2000. Description: I hit this problem with the following steps: 1. Create a class with a native ID generator (uses an Integer, but tried with in as well). 2. Instantiate that object, set some bean properties, call saveOrUpdate on this. Do not set a bean property for something that IS marked as not-null="true". This means it should fail to persist. 3. Call saveOrUpdate on the object, which should in theory generate a new ID and save it when session flushes. 4. When session flushes, you get a null pointer exception in net.sf.hibernate.impl.SessionImpl:2519 because id is null, because it couldn't save. The fix is to change that if comparison from ( !id.equals(oid)) to ((id == null && oid != null) || (id != null && !id.equals(oid)) ) With this in place, the checkId will now pass through cleanly (because id == oid == null), which I think is the correct behavior. The benefit is that instead of an unintelligible null pointer exception, it falls through and gives me the Flush not possible because a not-null value is null. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 16:23:41
|
The following comment has been added to this issue: Author: Sebastien Cesbron Created: Fri, 5 Dec 2003 10:23 AM Body: I had to change 'getPersister' with 'getClassPersister' on line 3430 in the 'count' method of the 'SessionImpl' class. Otherwise it seems to do the job for me. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-474 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-474 Summary: adding Criteria.count() method Type: Patch Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 2.1 rc1 Assignee: Reporter: Chris Nelson Created: Sun, 16 Nov 2003 12:53 PM Updated: Fri, 5 Dec 2003 10:23 AM Description: Adds a count() method to the Criteria class that does a modified query to return the count without returning entire query. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 15:20:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-527 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-527 Summary: Session.find throws ClassCastException when composite id is used and Class not Serializable Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: John Caruso Created: Fri, 5 Dec 2003 9:18 AM Updated: Fri, 5 Dec 2003 9:18 AM Environment: Hibernate 2.1 rc1, Oracle 8.1.7 Description: Loader.java (line 347) resultId = (Serializable) idType.nullSafeGet(rs, suffixedKeyColumns[i], session, null); //problematic for <key-many-to-one>! The API docs say that session.find(String query) throws only a Hibernate Exception. The ClassCast Exception is thrown and perhaps can be avoided by using isAssignableFrom(java.io.Serializable.class) first and throwing a HibernateException describing that the class doesn't implement Serializable when it should. (This took me a while to figure out before actually going into the hibernate source code to find the source of the error) I apologize if this bug is already known, however, I do not have time to cruise through the bug reports. Hibernate is a godsend. Keep up the good work! ;) --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 14:24:41
|
The following comment has been added to this issue: Author: Gavin King Created: Fri, 5 Dec 2003 8:23 AM Body: As I said, you must reproduce it in a simple stripped-down test case. You should not really even submit bug reports before you have isolated the problem. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-526 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-526 Summary: Problem finding records with compound primary keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: David R Robison Created: Fri, 5 Dec 2003 7:53 AM Updated: Fri, 5 Dec 2003 8:23 AM Environment: postgresql on W2K Description: I'm trying to find a record with a compound key. The following is my session.find call: Session hbSession = HibernateSession.currentSession(); types = hbSession.find("from com.orci.ITSAM.hibernate.SegmentType sgType " + "where sgType.comp_id.siteDatabase.comp_id.site = ? " + "and sgType.comp_id.siteDatabase.comp_id.dbId = ? ", new Object[] { SiteDatabaseServices.MyDbSiteCode(context), SiteDatabaseServices.MyDbId(context) }, new Type[] { Hibernate.INTEGER, Hibernate.INTEGER }); I'v set show_sql to true. When this line is executed, the following SQL statement prints: select segmenttyp0_.sg_type_code as sg_type_1_, segmenttyp0_.sg_db_site as sg_db_site, segmenttyp0_.sg_db_id as sg_db_id, segmenttyp0_.name as name, segmenttyp0_.default_mnemonic as default_5_, segmenttyp0_.gmt_last_updated as gmt_last6_, segmenttyp0_.rstat_type_code as rstat_ty7_, segmenttyp0_.last_upd_db_site as last_upd8_, segmenttyp0_.last_upd_db_id as last_upd9_ from segment_type segmenttyp0_ where (segmenttyp0_.sg_db_id=? )and(segmenttyp0_.sg_db_site=? ) What is interesting is that the WHERE clause checks the site first and then the dbId but in the printed SQL statement, the WHERE clause is db_id first and then site. This causes problems with the parameters passed into the find call. Any ideas why the SQL WHERE clause is being rearanged? Thanks, David Robison --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 14:17:41
|
The following comment has been added to this issue: Author: David R Robison Created: Fri, 5 Dec 2003 8:17 AM Body: I have rechecked my work several times. no mater which field I check first in the find where clause, it gets reversed on the PostgreSQL SQL statement. I could send you a small main file, but the database schema file is quite large. It would also require a PostgreSQL database. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-526 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-526 Summary: Problem finding records with compound primary keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: David R Robison Created: Fri, 5 Dec 2003 7:53 AM Updated: Fri, 5 Dec 2003 8:17 AM Environment: postgresql on W2K Description: I'm trying to find a record with a compound key. The following is my session.find call: Session hbSession = HibernateSession.currentSession(); types = hbSession.find("from com.orci.ITSAM.hibernate.SegmentType sgType " + "where sgType.comp_id.siteDatabase.comp_id.site = ? " + "and sgType.comp_id.siteDatabase.comp_id.dbId = ? ", new Object[] { SiteDatabaseServices.MyDbSiteCode(context), SiteDatabaseServices.MyDbId(context) }, new Type[] { Hibernate.INTEGER, Hibernate.INTEGER }); I'v set show_sql to true. When this line is executed, the following SQL statement prints: select segmenttyp0_.sg_type_code as sg_type_1_, segmenttyp0_.sg_db_site as sg_db_site, segmenttyp0_.sg_db_id as sg_db_id, segmenttyp0_.name as name, segmenttyp0_.default_mnemonic as default_5_, segmenttyp0_.gmt_last_updated as gmt_last6_, segmenttyp0_.rstat_type_code as rstat_ty7_, segmenttyp0_.last_upd_db_site as last_upd8_, segmenttyp0_.last_upd_db_id as last_upd9_ from segment_type segmenttyp0_ where (segmenttyp0_.sg_db_id=? )and(segmenttyp0_.sg_db_site=? ) What is interesting is that the WHERE clause checks the site first and then the dbId but in the printed SQL statement, the WHERE clause is db_id first and then site. This causes problems with the parameters passed into the find call. Any ideas why the SQL WHERE clause is being rearanged? Thanks, David Robison --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 14:05:41
|
The following comment has been added to this issue: Author: Hunter Kelly Created: Fri, 5 Dec 2003 8:05 AM Body: Well, can the text in README.txt indicate that it's needed outside an appserver? Something better than just "optional". For example, running apps inside tomcat 4.1.20 something it needs to be added to the classpath... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-525 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-525 Summary: jta.jar now required, update lib/README.txt Type: Patch Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.1 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Fri, 5 Dec 2003 4:32 AM Updated: Fri, 5 Dec 2003 8:05 AM Description: Gavin said that JTA is now required, here is a patch to update the lib/README.txt file. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 13:58:41
|
The following comment has been added to this issue: Author: Gavin King Created: Fri, 5 Dec 2003 7:58 AM Body: I really find this incredibly difficult to believe. Recheck your work. Anyway, unless you can provide a very, very simple main() method that reproduces this, I will reject this. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-526 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-526 Summary: Problem finding records with compound primary keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: David R Robison Created: Fri, 5 Dec 2003 7:53 AM Updated: Fri, 5 Dec 2003 7:58 AM Environment: postgresql on W2K Description: I'm trying to find a record with a compound key. The following is my session.find call: Session hbSession = HibernateSession.currentSession(); types = hbSession.find("from com.orci.ITSAM.hibernate.SegmentType sgType " + "where sgType.comp_id.siteDatabase.comp_id.site = ? " + "and sgType.comp_id.siteDatabase.comp_id.dbId = ? ", new Object[] { SiteDatabaseServices.MyDbSiteCode(context), SiteDatabaseServices.MyDbId(context) }, new Type[] { Hibernate.INTEGER, Hibernate.INTEGER }); I'v set show_sql to true. When this line is executed, the following SQL statement prints: select segmenttyp0_.sg_type_code as sg_type_1_, segmenttyp0_.sg_db_site as sg_db_site, segmenttyp0_.sg_db_id as sg_db_id, segmenttyp0_.name as name, segmenttyp0_.default_mnemonic as default_5_, segmenttyp0_.gmt_last_updated as gmt_last6_, segmenttyp0_.rstat_type_code as rstat_ty7_, segmenttyp0_.last_upd_db_site as last_upd8_, segmenttyp0_.last_upd_db_id as last_upd9_ from segment_type segmenttyp0_ where (segmenttyp0_.sg_db_id=? )and(segmenttyp0_.sg_db_site=? ) What is interesting is that the WHERE clause checks the site first and then the dbId but in the printed SQL statement, the WHERE clause is db_id first and then site. This causes problems with the parameters passed into the find call. Any ideas why the SQL WHERE clause is being rearanged? Thanks, David Robison --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 13:54:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-526 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-526 Summary: Problem finding records with compound primary keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: David R Robison Created: Fri, 5 Dec 2003 7:53 AM Updated: Fri, 5 Dec 2003 7:53 AM Environment: postgresql on W2K Description: I'm trying to find a record with a compound key. The following is my session.find call: Session hbSession = HibernateSession.currentSession(); types = hbSession.find("from com.orci.ITSAM.hibernate.SegmentType sgType " + "where sgType.comp_id.siteDatabase.comp_id.site = ? " + "and sgType.comp_id.siteDatabase.comp_id.dbId = ? ", new Object[] { SiteDatabaseServices.MyDbSiteCode(context), SiteDatabaseServices.MyDbId(context) }, new Type[] { Hibernate.INTEGER, Hibernate.INTEGER }); I'v set show_sql to true. When this line is executed, the following SQL statement prints: select segmenttyp0_.sg_type_code as sg_type_1_, segmenttyp0_.sg_db_site as sg_db_site, segmenttyp0_.sg_db_id as sg_db_id, segmenttyp0_.name as name, segmenttyp0_.default_mnemonic as default_5_, segmenttyp0_.gmt_last_updated as gmt_last6_, segmenttyp0_.rstat_type_code as rstat_ty7_, segmenttyp0_.last_upd_db_site as last_upd8_, segmenttyp0_.last_upd_db_id as last_upd9_ from segment_type segmenttyp0_ where (segmenttyp0_.sg_db_id=? )and(segmenttyp0_.sg_db_site=? ) What is interesting is that the WHERE clause checks the site first and then the dbId but in the printed SQL statement, the WHERE clause is db_id first and then site. This causes problems with the parameters passed into the find call. Any ideas why the SQL WHERE clause is being rearanged? Thanks, David Robison --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 13:36:41
|
Message: The following issue has been closed. Resolver: Gavin King Date: Fri, 5 Dec 2003 7:36 AM Its not required. Its only needed when running outside of an appserver. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-525 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-525 Summary: jta.jar now required, update lib/README.txt Type: Patch Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.1 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Fri, 5 Dec 2003 4:32 AM Updated: Fri, 5 Dec 2003 7:36 AM Description: Gavin said that JTA is now required, here is a patch to update the lib/README.txt file. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 13:26:41
|
The following comment has been added to this issue: Author: Don DeLuca Created: Fri, 5 Dec 2003 7:26 AM Body: I'm using ScrollableResults as a way to iterate through a large result set. I have some business logic that will iterate through this and process each row. I don't want to take the hit of buffering all the rows into a List. For my use case I don't need all the "scrolling" functionality but I want to leverage how its a facade over the underlying JDBC ResultSet. If I understand the Criteria.list() and Query.list() methods correctly these fetch all the rows and returns a fully populated List. I don't want to take the resource hit if I can avoid it. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-521 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-521 Summary: ScrollableResults from Criteria class Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Assignee: Reporter: Don DeLuca Created: Thu, 4 Dec 2003 10:00 AM Updated: Fri, 5 Dec 2003 7:26 AM Environment: JDBC 2.0 compliant database that supports result set scrolling. Description: I've been using the Criteria API provided by Hibernate. Its really excellent. Would it be possible to provide scrolling functionality in the Criteria API similar to that in the Query API which has a scroll() method that returns a ScrollableResults object. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 10:34:44
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Fri, 5 Dec 2003 4:33 AM Comment: Here is the patch Changes: Attachment changed to hibernate.readme.patch --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-525&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-525 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-525 Summary: jta.jar now required, update lib/README.txt Type: Patch Status: Unassigned Priority: Minor Project: Hibernate2 Components: toolset Versions: 2.1 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Fri, 5 Dec 2003 4:32 AM Updated: Fri, 5 Dec 2003 4:33 AM Description: Gavin said that JTA is now required, here is a patch to update the lib/README.txt file. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 10:32:42
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-525 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-525 Summary: jta.jar now required, update lib/README.txt Type: Patch Status: Unassigned Priority: Minor Project: Hibernate2 Components: toolset Versions: 2.1 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Fri, 5 Dec 2003 4:32 AM Updated: Fri, 5 Dec 2003 4:32 AM Description: Gavin said that JTA is now required, here is a patch to update the lib/README.txt file. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 03:36:05
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 4 Dec 2003 8:01 PM A recent change to IteratorImpl broke the handling of null values. Fixed in CVS. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-524 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-524 Summary: iterate shows hasNext=true when nothing returned Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 final Versions: 2.1 rc1 Assignee: Reporter: David R Robison Created: Thu, 4 Dec 2003 4:47 PM Updated: Thu, 4 Dec 2003 8:01 PM Environment: postgresql on W2K Description: I use session.iterate() to retrieve a list of records. I know that the first time I issue the iterate, that it should return nothing. However, it still reports hasNext as true. Here is a code snipit: public class SegmentTypeServices { protected static Logger logger = Logger.getLogger(SegmentTypeServices.class.getName()); public static int nextSegmentTypeCode(ControlEventContext context) throws HibernateException, AppConfigError { Session hbSession = HibernateSession.currentSession(); Iterator maxCodeList = hbSession.iterate("select max(sgType.comp_id.sgTypeCode) from com.orci.ITSAM.hibernate.SegmentType sgType " + "where sgType.comp_id.siteDatabase.comp_id.site = ? " + "and sgType.comp_id.siteDatabase.comp_id.dbId = ? ", new Object[] { SiteDatabaseServices.MyDbSiteCode(context), SiteDatabaseServices.MyDbId(context) }, new Type[] { Hibernate.INTEGER, Hibernate.INTEGER }); if (!maxCodeList.hasNext()) return 1; Object[] row = (Object[])maxCodeList.next(); return ((Integer)row[0]).intValue(); } When I run it I get a java.util.NoSuchElementException: No more results exception. Any ideas? Thanks in advance, David Robison --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 03:34:11
|
The following comment has been added to this issue: Author: Gavin King Created: Thu, 4 Dec 2003 8:04 PM Body: A question: what do you use ScrollableResults for? I always think that its a bit bloaty... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-521 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-521 Summary: ScrollableResults from Criteria class Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Assignee: Reporter: Don DeLuca Created: Thu, 4 Dec 2003 10:00 AM Updated: Thu, 4 Dec 2003 8:04 PM Environment: JDBC 2.0 compliant database that supports result set scrolling. Description: I've been using the Criteria API provided by Hibernate. Its really excellent. Would it be possible to provide scrolling functionality in the Criteria API similar to that in the Query API which has a scroll() method that returns a ScrollableResults object. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 03:32:50
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 4 Dec 2003 8:06 PM JTA is now needed in the classpath. README.txt lists it as optional, since most people already have JTA. This is consistent with what we say about other jars like JDBC2. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-523 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-523 Summary: jta.jar becomes mandatory in 2.1 Type: Improvement Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: core Fix Fors: 2.1 rc1 Versions: 2.1 beta 6 Assignee: Gavin King Reporter: Dmitry Created: Thu, 4 Dec 2003 4:20 PM Updated: Thu, 4 Dec 2003 8:06 PM Description: In Hibernate 2.0.3 JTA was trully optional. But after migraring to Hibernate 2.1 I was forced to add jta.jar to classpath. Otherwise exception was thrown: java.lang.NoClassDefFoundError: javax/transaction/Synchronization at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:306) at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:310) As Max said: "..but our VERSIONS file says jta.jar is optional - so either that file should be updated or code has to be changed in sessionimpl to avoid force load of jta....submit it to the JIRA and let Gavin fry ;)" ( http://forum.hibernate.org/viewtopic.php?t=926091 ) --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 03:32:50
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@hi...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-509 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-509 Summary: Possibility to specify additional properties for JMX MBean Type: New Feature Status: Open Priority: Major Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Gavin King Reporter: Michael Gloegl Created: Mon, 1 Dec 2003 4:28 AM Updated: Thu, 4 Dec 2003 8:07 PM Description: There should be a possibility to specify additional properties like the hibernate cache provider or the "use outer join" option in the jboss-service.xml when using the MBean Adapter. This is especially important as the inability to set the cache provider creates a dependency with ehcache.jar (through net.sf.ehcache.hibernate.Provider) even when not using any caching. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 03:26:31
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 4 Dec 2003 8:02 PM Done. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-508 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-508 Summary: DTD update to 2.1 Type: Improvement Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Versions: 2.1 final Assignee: Gavin King Reporter: Christian Bauer Created: Sat, 29 Nov 2003 3:41 PM Updated: Thu, 4 Dec 2003 8:02 PM Description: All DTDs in the Hibernate source and on hibernate.sourgeforge.net have to be updated for 2.1. This means either to just rename the DTD or to actually copy a new version to the website. In the source: ./src/net/sf/hibernate/hibernate-configuration-2.0.dtd ./src/net/sf/hibernate/hibernate-mapping-2.0.dtd On the website: hibernate-mapping-1.1.dtd hibernate-mapping-2.0.dtd hibernate-configuration-2.0.dtd hibernate-mapping.dtd hibernate-configuration.dtd I suggest we leave the "untagged" files as they are (the ones without version number) and just add the 2.1 versions. All version numbers have to be replaced in the source files (the unit tests) and documentation. According to our roadmap, 2.1 is the stable release for the next 6 to 12 months, but we have a significant installation base for 2.0. We can't continue mixing them and have to update now. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-05 02:47:41
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 4 Dec 2003 8:46 PM OK, try out the new features in CVS (v21branch). --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-509 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-509 Summary: Possibility to specify additional properties for JMX MBean Type: New Feature Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 final Versions: 2.1 rc1 Assignee: Gavin King Reporter: Michael Gloegl Created: Mon, 1 Dec 2003 4:28 AM Updated: Thu, 4 Dec 2003 8:46 PM Description: There should be a possibility to specify additional properties like the hibernate cache provider or the "use outer join" option in the jboss-service.xml when using the MBean Adapter. This is especially important as the inability to set the cache provider creates a dependency with ehcache.jar (through net.sf.ehcache.hibernate.Provider) even when not using any caching. --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-04 22:48:40
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-524 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-524 Summary: iterate shows hasNext=true when nothing returned Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: David R Robison Created: Thu, 4 Dec 2003 4:47 PM Updated: Thu, 4 Dec 2003 4:47 PM Environment: postgresql on W2K Description: I use session.iterate() to retrieve a list of records. I know that the first time I issue the iterate, that it should return nothing. However, it still reports hasNext as true. Here is a code snipit: public class SegmentTypeServices { protected static Logger logger = Logger.getLogger(SegmentTypeServices.class.getName()); public static int nextSegmentTypeCode(ControlEventContext context) throws HibernateException, AppConfigError { Session hbSession = HibernateSession.currentSession(); Iterator maxCodeList = hbSession.iterate("select max(sgType.comp_id.sgTypeCode) from com.orci.ITSAM.hibernate.SegmentType sgType " + "where sgType.comp_id.siteDatabase.comp_id.site = ? " + "and sgType.comp_id.siteDatabase.comp_id.dbId = ? ", new Object[] { SiteDatabaseServices.MyDbSiteCode(context), SiteDatabaseServices.MyDbId(context) }, new Type[] { Hibernate.INTEGER, Hibernate.INTEGER }); if (!maxCodeList.hasNext()) return 1; Object[] row = (Object[])maxCodeList.next(); return ((Integer)row[0]).intValue(); } When I run it I get a java.util.NoSuchElementException: No more results exception. Any ideas? Thanks in advance, David Robison --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-04 22:27:41
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@hi...) Assigner: Max Rydahl Andersen (mailto:xa...@xa...) Date: Thu, 4 Dec 2003 4:27 PM Comment: Fry! ;) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-523 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-523 Summary: jta.jar becomes mandatory in 2.1 Type: Improvement Status: Open Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 beta 6 Assignee: Gavin King Reporter: Dmitry Created: Thu, 4 Dec 2003 4:20 PM Updated: Thu, 4 Dec 2003 4:27 PM Description: In Hibernate 2.0.3 JTA was trully optional. But after migraring to Hibernate 2.1 I was forced to add jta.jar to classpath. Otherwise exception was thrown: java.lang.NoClassDefFoundError: javax/transaction/Synchronization at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:306) at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:310) As Max said: "..but our VERSIONS file says jta.jar is optional - so either that file should be updated or code has to be changed in sessionimpl to avoid force load of jta....submit it to the JIRA and let Gavin fry ;)" ( http://forum.hibernate.org/viewtopic.php?t=926091 ) --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-04 22:21:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-523 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-523 Summary: jta.jar becomes mandatory in 2.1 Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 beta 6 Assignee: Reporter: Dmitry Created: Thu, 4 Dec 2003 4:20 PM Updated: Thu, 4 Dec 2003 4:20 PM Description: In Hibernate 2.0.3 JTA was trully optional. But after migraring to Hibernate 2.1 I was forced to add jta.jar to classpath. Otherwise exception was thrown: java.lang.NoClassDefFoundError: javax/transaction/Synchronization at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:306) at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:310) As Max said: "..but our VERSIONS file says jta.jar is optional - so either that file should be updated or code has to be changed in sessionimpl to avoid force load of jta....submit it to the JIRA and let Gavin fry ;)" ( http://forum.hibernate.org/viewtopic.php?t=926091 ) --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-04 21:45:41
|
The following comment has been added to this issue: Author: Linus Kamb Created: Thu, 4 Dec 2003 3:44 PM Body: yes, I saw that after I created the issue. :-) thanks. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-522 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-522 Summary: Correct collection type for sorted collections Type: Patch Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Components: toolset Fix Fors: 2.1 rc1 Versions: 2.0.2 Assignee: Max Rydahl Andersen Reporter: Linus Kamb Created: Thu, 4 Dec 2003 11:46 AM Updated: Thu, 4 Dec 2003 3:44 PM Environment: Hibernate extensions 2.0.2 Description: When generating Java code from an hbm.xml file, all [sets|bags|maps] listed in the mapping file after a sorted [set|bag|map] will be generated as sorted. So, given the following mapping (in pseudo-hbm): Example (in pseudo-hbm :-) <mapping> <class name="SomeClass"> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> </class> </mapping> This correctly generates public class SomeClass { private Set plainSet; // plus Set-based getters and setters private SortedSet sortedSet; // plus SortedSet-based getters and setters. } now, if I change the mapping: <mapping> <class name="SomeClass"> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> </class> </mapping> This incorrectly generates public class SomeClass { private SortedSet sortedSet; // plus SortedSet-based getters and setters. private SortedSet plainSet; // plus SortedSet-based getters and setters. } [Since this is the first time I've entered anything in JIRA, and I don't see where to add that patch attachment, I am going to include it here.] --- hibernate-extensions-2.0.2/tools/src/net/sf/hibernate/tool/hbm2java/ClassMapping.java Tue Oct 21 15:14:16 2003 +++ /users/linus/projects/scratch/net/sf/hibernate/tools/hbm2java/ClassMapping.java Thu Dec 4 09:31:11 2003 @@ -488,6 +488,9 @@ private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass, MultiMap inheritedMeta) { + String originalInterface = interfaceClass; + String originalImplementingClass = implementingClass; + for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { Element collection = (Element) collections.next(); @@ -495,15 +498,21 @@ String name = collection.getAttributeValue("name"); // Small hack to switch over to sortedSet/sortedMap if sort is specified. (that is sort != unsorted) - if (!"unsorted".equals(collection.getAttributeValue("sort"))) { - if("map".equals(xmlName)) { - interfaceClass = SortedMap.class.getName(); - implementingClass = TreeMap.class.getName(); - } else if("set".equals(xmlName)) { - interfaceClass = SortedSet.class.getName(); - implementingClass = TreeSet.class.getName(); - } - } + String sort = collection.getAttributeValue("sort"); + if ("unsorted".equals(sort) || + "".equals(sort)) { + interfaceClass = originalInterface; + implementingClass = originalImplementingClass; + } + else { + if("map".equals(xmlName)) { + interfaceClass = SortedMap.class.getName(); + implementingClass = TreeMap.class.getName(); + } else if("set".equals(xmlName)) { + interfaceClass = SortedSet.class.getName(); + implementingClass = TreeSet.class.getName(); + } + } ClassName interfaceClassName = new ClassName(); ClassName implementingClassName = new ClassName(); @@ -513,10 +522,11 @@ // add an import and field for this collection addImport(interfaceClassName); --------------------------------------------------------------------- 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: <leg...@at...> - 2003-12-04 21:39:41
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Thu, 4 Dec 2003 3:37 PM Body: btw...to add a file just create the issue first with the basic comments and after that click "Attach file" --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-522 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-522 Summary: Correct collection type for sorted collections Type: Patch Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Components: toolset Fix Fors: 2.1 rc1 Versions: 2.0.2 Assignee: Max Rydahl Andersen Reporter: Linus Kamb Created: Thu, 4 Dec 2003 11:46 AM Updated: Thu, 4 Dec 2003 3:37 PM Environment: Hibernate extensions 2.0.2 Description: When generating Java code from an hbm.xml file, all [sets|bags|maps] listed in the mapping file after a sorted [set|bag|map] will be generated as sorted. So, given the following mapping (in pseudo-hbm): Example (in pseudo-hbm :-) <mapping> <class name="SomeClass"> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> </class> </mapping> This correctly generates public class SomeClass { private Set plainSet; // plus Set-based getters and setters private SortedSet sortedSet; // plus SortedSet-based getters and setters. } now, if I change the mapping: <mapping> <class name="SomeClass"> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> </class> </mapping> This incorrectly generates public class SomeClass { private SortedSet sortedSet; // plus SortedSet-based getters and setters. private SortedSet plainSet; // plus SortedSet-based getters and setters. } [Since this is the first time I've entered anything in JIRA, and I don't see where to add that patch attachment, I am going to include it here.] --- hibernate-extensions-2.0.2/tools/src/net/sf/hibernate/tool/hbm2java/ClassMapping.java Tue Oct 21 15:14:16 2003 +++ /users/linus/projects/scratch/net/sf/hibernate/tools/hbm2java/ClassMapping.java Thu Dec 4 09:31:11 2003 @@ -488,6 +488,9 @@ private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass, MultiMap inheritedMeta) { + String originalInterface = interfaceClass; + String originalImplementingClass = implementingClass; + for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { Element collection = (Element) collections.next(); @@ -495,15 +498,21 @@ String name = collection.getAttributeValue("name"); // Small hack to switch over to sortedSet/sortedMap if sort is specified. (that is sort != unsorted) - if (!"unsorted".equals(collection.getAttributeValue("sort"))) { - if("map".equals(xmlName)) { - interfaceClass = SortedMap.class.getName(); - implementingClass = TreeMap.class.getName(); - } else if("set".equals(xmlName)) { - interfaceClass = SortedSet.class.getName(); - implementingClass = TreeSet.class.getName(); - } - } + String sort = collection.getAttributeValue("sort"); + if ("unsorted".equals(sort) || + "".equals(sort)) { + interfaceClass = originalInterface; + implementingClass = originalImplementingClass; + } + else { + if("map".equals(xmlName)) { + interfaceClass = SortedMap.class.getName(); + implementingClass = TreeMap.class.getName(); + } else if("set".equals(xmlName)) { + interfaceClass = SortedSet.class.getName(); + implementingClass = TreeSet.class.getName(); + } + } ClassName interfaceClassName = new ClassName(); ClassName implementingClassName = new ClassName(); @@ -513,10 +522,11 @@ // add an import and field for this collection addImport(interfaceClassName); --------------------------------------------------------------------- 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 |