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-07-13 11:25:44
|
The following comment has been added to this issue: Author: Tom Ward Created: Sun, 13 Jul 2003 6:25 AM Body: Clearly, the dirtyProperties array needs to be correct at the point the update is scheduled. I can't immediately think how to do this efficiently, without breaking the Interceptor interface. I'll write unit tests for both the joined-subclass and dynamic update scenarios, and see if I can think of any way to fix them. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-182 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-182 Summary: dirtyProperties array incorrect following Interceptor.onFlushDirty Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Versions: 2.0.1 Assignee: Gavin King Reporter: Tom Ward Created: Fri, 11 Jul 2003 2:54 AM Updated: Fri, 11 Jul 2003 11:44 PM Description: As Simon Spero noted in issue HB-4, in SessionImpl.flushEntities, the dirtyProperties array is calculated before Interceptor.onFlushDirty is called. As onFlushDirty has no way of reporting which of the currentState properties it has changed, if onFlushDirty does change a property, the dirtyProperties array will be incorrect. This seems to be an issue in the following scenario - A superclass Super defines an id and a dateModified property, while a subclass Sub defines a commentText property. Sub is mapped as a joined-subclass of Super. An Interceptor is written to change the dateModified property in the currentState to the current date, whenever onFlushDirty is called. The issue is this - if commentText is changed and the object is flushed, the Interceptor correctly modifies the dateModified. This change makes its way back to the instance of Sub, as expected. However, when the time comes to update the object in the database, only the commentText is updated. I believe that this is because as a joined-subclass, Sub is mapped across two tables, but the dirtyProperties array, calculcated before the call to onFlushDirty, only shows a change affecting one of these tables. The ways I've found to work-around this are - 1) If using Interceptors, use a mapping strategy other than joined-subclasses. 2) Implement Interceptor.findDirty to return the properties you know will change in onFlushDirty (if other properties are dirty too). This seems very awkward. For me, the ideal solution would be to change the return type of Interceptor.onFlushDirty to an int[], indicating the properties which have been changed. Then it would be a simple task to calculate the union of this array and dirtyProperties (and maybe even recheck the intersection). I hope this is all helpful - I have read and re-read the javadocs to try and make sure I'm not missing anything, but it is still possible. I'll give as much help as I can trying to fix this. --------------------------------------------------------------------- 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-07-13 10:26:44
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Sun, 13 Jul 2003 5:24 AM Body: It should probably be controlled by an option. But anyhow - this stuff is for the "old" ReverseEng, right ? It would be much better to concentrate on the middlegen plugin is it does the job much better (and is Hibernate2 compliant, ReverseEng is not) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-21 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-21 Summary: mapping presevation Type: Improvement Status: Assigned Priority: Minor Project: Hibernate2 Assignee: Max Rydahl Andersen Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:11 AM Updated: Sat, 12 Jul 2003 8:37 PM Description: mapping presevation I'd like to see the mapping generator to be enhanced a bit so that when an existing mapping file is detected, it will not overwrite it. It would be even better if it knows how to do a safe merge. shaohua http://sourceforge.net/tracker/index.php?func=detail&aid=642142&group_id=40712&atid=428711 --------------------------------------------------------------------- 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-07-13 01:38:43
|
Message: The following issue has been re-assigned. Assignee: Max Rydahl Andersen (mailto:xa...@xa...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-21 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-21 Summary: mapping presevation Type: Improvement Status: Assigned Priority: Minor Project: Hibernate2 Assignee: Max Rydahl Andersen Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:11 AM Updated: Sat, 12 Jul 2003 8:37 PM Description: mapping presevation I'd like to see the mapping generator to be enhanced a bit so that when an existing mapping file is detected, it will not overwrite it. It would be even better if it knows how to do a safe merge. shaohua http://sourceforge.net/tracker/index.php?func=detail&aid=642142&group_id=40712&atid=428711 --------------------------------------------------------------------- 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-07-13 01:24:44
|
The following comment has been added to this issue: Author: Nick Heudecker Created: Sat, 12 Jul 2003 8:23 PM Body: I'm willing to tackle this to make sure that overwrites don't occur. The question is if an exception should be thrown, and if processing should stop when a conflict occurs, or simply continue on. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-21 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-21 Summary: mapping presevation Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Assignee: Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:11 AM Updated: Tue, 13 May 2003 6:28 AM Description: mapping presevation I'd like to see the mapping generator to be enhanced a bit so that when an existing mapping file is detected, it will not overwrite it. It would be even better if it knows how to do a safe merge. shaohua http://sourceforge.net/tracker/index.php?func=detail&aid=642142&group_id=40712&atid=428711 --------------------------------------------------------------------- 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-07-12 14:05:43
|
The following comment has been added to this issue: Author: Tom Sedge Created: Sat, 12 Jul 2003 9:05 AM Body: Fantastic. Thanks Gavin. :) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-183 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-183 Summary: Add <where> clause for main class Type: New Feature Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Versions: 2.0.1 Assignee: Reporter: Tom Sedge Created: Fri, 11 Jul 2003 2:57 AM Updated: Sat, 12 Jul 2003 4:02 AM Environment: N/A Description: Please add a simple way to add a where clause on all SELECTs for a class - like the <where> tag in collections. The situation is that I am mapping a legacy table where I don't want or need to deal with all rows. Therefore on a SELECT * or any other query I only want to select certain rows. Which rows depends on the value of two columns (e.g. where t.c1 > 20 and t.c2 < 300) so a discriminator is no help for this. However, I *do* have more than one type of object in the table, which is why I wish to ignore some rows. I daresay I could do this with a custom persister, but it looks like this should be built-in functionality to me. --------------------------------------------------------------------- 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-07-12 09:16:43
|
The following comment has been added to this issue: Author: Dan Tran Created: Sat, 12 Jul 2003 4:16 AM Body: I reopened it in xdoclet's JIRA --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-170 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-170 Summary: Ablility to generate map file with assigned date as primary key using xdoclet Type: Bug Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: Dan Tran Created: Thu, 10 Jul 2003 12:27 AM Updated: Sat, 12 Jul 2003 1:08 AM Environment: XDoclet 1.2 beta3 Description: The following class with hibernte tag generates exception when feeding thru xdoclet to generate hbm.xml file package org.glvnsjc.model; /** * @author Dan Tran * @hibernate.class table="day" */ public class Day implements java.io.Serializable { private java.util.Date day; public Day() { } /** * @hibernate.id generator-class="assigned" */ public java.util.Date getDay() { return this.day; } public void setDay(java.util.Date value) { this.day = value; } } here is the stack trace hibernatedoclet] Generating mapping file for org.glvnsjc.model.Day. [hibernatedoclet] org.glvnsjc.model.Day [hibernatedoclet] (TemplateEngine.invokeMethod 541 ) Invoking method fai led: xdoclet.modules.hibernate.HibernateTagsHandler.ifHasCompositeId, line=100 o f template file: jar:file:C:\dev\thirdparty\sourceforge\xdoclet\lib\xdoclet-hibe rnate-module-1.2b4.jar!/xdoclet/modules/hibernate/resources/hibernate.xdt [hibernatedoclet] java.lang.reflect.InvocationTargetException [hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M ethod) --------------------------------------------------------------------- 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-07-12 09:02:46
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 4:02 AM I implemented this. Its in CVS :) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-183 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-183 Summary: Add <where> clause for main class Type: New Feature Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Versions: 2.0.1 Assignee: Reporter: Tom Sedge Created: Fri, 11 Jul 2003 2:57 AM Updated: Sat, 12 Jul 2003 4:02 AM Environment: N/A Description: Please add a simple way to add a where clause on all SELECTs for a class - like the <where> tag in collections. The situation is that I am mapping a legacy table where I don't want or need to deal with all rows. Therefore on a SELECT * or any other query I only want to select certain rows. Which rows depends on the value of two columns (e.g. where t.c1 > 20 and t.c2 < 300) so a discriminator is no help for this. However, I *do* have more than one type of object in the table, which is why I wish to ignore some rows. I daresay I could do this with a custom persister, but it looks like this should be built-in functionality to me. --------------------------------------------------------------------- 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-07-12 07:50:43
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-186 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-186 Summary: Problem in SQL generation with ".class" queries + "iterate()" Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Reporter: Fabio Tudone Created: Sat, 12 Jul 2003 2:50 AM Updated: Sat, 12 Jul 2003 2:50 AM Environment: Windows 2000, WSAD 5 JVM (IBM 1.3) Description: I'm having a strange problem in Hibernate 2.0.1 when using the session.createQuery() + query.iterate() APIs. My mapping is the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "--//Hibernate/Hibernate Mapping DTD//EN" "hibernate-mapping-2.0.dtd"> <hibernate-mapping auto-import="false" default-cascade="save-update"> <class name="test.model.Super"> <composite-id> <key-property name="id"/> </composite-id> <property name="superAttr"/> <joined-subclass name="test.model.Sub1"> <key> <column name="id"/> </key> <property name="sub1Attr"/> </joined-subclass> <joined-subclass name="test.model.Sub2"> <key> <column name="id"/> </key> <property name="sub2Attr"/> </joined-subclass> </class> </hibernate-mapping> The following code works perfectly: ... Transaction t = s.beginTransaction(); List l = s.find("from test.model.Super o where o.class = test.model.Sub1"); t.commit(); ... On the other hand, the following code hangs: ... Transaction t = s.beginTransaction(); Query q = s.createQuery("from test.model.Super o where o.class = test.model.Sub1"); Iterator it = q.iterate(); while (it.hasNext()) { Object o = it.next(); } t.commit(); ... The following SQL select query is generated by Hibernate upon the q.iterate() call: select super0_.id as x0_0_ from Super super0_ where (case when super0__1.id is not null then 1 when super0__2.id is not null then 2 when super0_.id is not null then 0 end=0 ) And the following exception is thrown by Oracle: [ERROR] JDBCExceptionReporter - -Could not execute query <java.sql.SQLException: ORA-00904: "SUPER0__2"."ID": invalid identifier >java.sql.SQLException: ORA-00904: "SUPER0__2"."ID": invalid identifier at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321) at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1255) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527) at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:62) at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:539) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:789) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1422) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:64) at test.query.TestQueryIter.main(TestQueryIter.java:58) java.sql.SQLException: ORA-00904: "SUPER0__2"."ID": invalid identifier at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321) at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1255) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527) at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:62) at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:539) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:789) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1422) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:64) at test.query.TestQueryIter.main(TestQueryIter.java:58) rethrown as net.sf.hibernate.JDBCException: Could not execute query: ORA-00904: "SUPER0__2"."ID": invalid identifier at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1425) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:64) at test.query.TestQueryIter.main(TestQueryIter.java:58) --------------------------------------------------------------------- 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-07-12 06:53:43
|
The following comment has been added to this issue: Author: Gavin King Created: Sat, 12 Jul 2003 1:52 AM Body: I just noticed that this is &really* easy to implement :) You just add the new condition in to EntityPersister.queryWhereFragment(), and perhaps NormalizedEntityPersister.queryWhereFragment(). It would be a <class where="SOME SQL"> attribute. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-183 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-183 Summary: Add <where> clause for main class Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Versions: 2.0.1 Assignee: Reporter: Tom Sedge Created: Fri, 11 Jul 2003 2:57 AM Updated: Fri, 11 Jul 2003 2:57 AM Environment: N/A Description: Please add a simple way to add a where clause on all SELECTs for a class - like the <where> tag in collections. The situation is that I am mapping a legacy table where I don't want or need to deal with all rows. Therefore on a SELECT * or any other query I only want to select certain rows. Which rows depends on the value of two columns (e.g. where t.c1 > 20 and t.c2 < 300) so a discriminator is no help for this. However, I *do* have more than one type of object in the table, which is why I wish to ignore some rows. I daresay I could do this with a custom persister, but it looks like this should be built-in functionality to me. --------------------------------------------------------------------- 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-07-12 06:51:43
|
The following comment has been added to this issue: Author: Gavin King Created: Sat, 12 Jul 2003 1:50 AM Body: I need more information about this - I can't seem to reproduce the problem..... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-151 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-151 Summary: Traversing several joined-subclasses in where clause leaves out inner joins Type: Bug Status: Assigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Gavin King Reporter: Christian Bauer Created: Tue, 8 Jul 2003 3:32 PM Updated: Tue, 8 Jul 2003 6:57 PM Environment: WSAD 5.0.1, JDK 1.3.1, Oracle 9i, Windows 2000 Description: Class-diagram: a-->b a inherits from b a==b a has relationship to b (Sorry, classnames are in Dutch) Persoon == Beroepsuitoefening Beroepsuitoefening <-- Jurist Jurist == Bevoegdheid Bevoegdheid <-- Beediging <-- Procureurschap If my query contains 'where jurist.persoon.naam like ?', the generated SQL looks like this (which is OK): select count(*) as x0_0_ from jurist persiste0_ inner join beroepsuitoefening persiste0__1 on persiste0_.beg_id=persiste0__1.id, persoon persiste1_ where ( ( persiste1_.naam like ? and persiste0__1.psn_id=persiste1_.id ) ) However, if I start one level deeper in the hierarchy ('where procureurschap.jurist.persoon.naam like ?') the SQL query looks like this: select count(*) as x0_0_ from procureurschap persiste0_ inner join beediging persiste0__1 on persiste0_.bvh_id=persiste0__1.bvh_id inner join bevoegdheid persiste0__2 on persiste0_.bvh_id=persiste0__2.id, jurist persiste1_, persoon persiste2_ where ( ( persiste2_.naam=? and persiste0__2.beg_id=persiste1_.beg_id and persiste1__1.psn_id=persiste2_.id ) ) [Queries are indented to show outline] As you can see, the last clause references persiste1__1, which isn't listed in the from clause. It's intended to, because the pattern matches with the previous example (_1 begin the first innerjoin for persiste1_). It should be an alias for beroepsuitoefening just as it is in the previous example. --------------------------------------------------------------------- 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-07-12 06:49:43
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 1:49 AM This seems to be working very well.... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-153 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-153 Summary: discriminator force true doesn't work Type: Bug Status: Closed Priority: Minor Resolution: CANNOT REPRODUCE Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Gavin King Reporter: Christian Bauer Created: Tue, 8 Jul 2003 3:34 PM Updated: Sat, 12 Jul 2003 1:49 AM Environment: win2000, WSAD v5, DB2, websphere v5 Description: A discriminator force true does not cause Hibernate to ignore unmapped discriminator values, instead WrongClassException is thrown. see http://sourceforge.net/forum/forum.php?thread_id=889426&forum_id=128638 for more info --------------------------------------------------------------------- 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 |
The following comment has been added to this issue: Author: Gavin King Created: Sat, 12 Jul 2003 1:12 AM Body: Please submit patches in the correct patch format cvs diff -r -U -N Try running the patch target of the build script. (You will need to be working from CVS.) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-177 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-177 Summary: (Includes Fix) Return type of aggregate function, sum, when applied over booleans should be an integer, giving the number of true values Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 2.0 final 2.0.1 2.0.2 Assignee: Reporter: Hugh Leather Created: Thu, 10 Jul 2003 3:38 PM Updated: Thu, 10 Jul 2003 3:38 PM Environment: MySql Description: When doing a select which aggregates a sum of booleans, the result is also a boolean. I think this is no so useful and would prefer the number of true values. This is what seems to be returned from the underlying sql, but the information is destroyed by casting to a boolean. The fix I have for this issue is a few small chnges to SelectParser.java. Here is the new file, with my additions marked by comments along the lines of // Begin change ... If anyone things this is worth adding and intends to do so, could you email me aat hug...@ho... and let me know. Thanks, Hugh. //$Id: SelectParser.java,v 1.12 2003/05/07 15:09:05 oneovthafew Exp $ package net.sf.hibernate.hql; import java.sql.Types; import java.util.HashSet; import java.util.Set; import net.sf.hibernate.AssertionFailure; import net.sf.hibernate.Hibernate; import net.sf.hibernate.MappingException; import net.sf.hibernate.QueryException; // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) import net.sf.hibernate.type.BooleanType; // End change : Hugh Leather 10.07.2003 (See comment at top of file) import net.sf.hibernate.type.Type; import net.sf.hibernate.util.StringHelper; /** * Parsers the select clause of a hibernate query, looking * for a table (well, really class) alias. */ // Change : Hugh Leather 10.07.2003 // Several small changes are introduced to ensure that the return type of the // sum aggregate function over booleans gives an integer result. public class SelectParser implements Parser { private static final Set aggregateFunctions = new HashSet(); private static final Set countArguments = new HashSet(); static { aggregateFunctions.add("count"); aggregateFunctions.add("avg"); aggregateFunctions.add("max"); aggregateFunctions.add("min"); aggregateFunctions.add("sum"); countArguments.add("distinct"); countArguments.add("all"); countArguments.add("*"); } private boolean ready; private boolean aggregate; private boolean count; private boolean avg; // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) private boolean sum; // End change : Hugh Leather 10.07.2003 (See comment at top of file) private boolean first; private boolean afterNew; private Class holderClass; private SelectPathExpressionParser pathExpressionParser = new SelectPathExpressionParser(); private PathExpressionParser aggregatePathExpressionParser = new PathExpressionParser(); public void token(String token, QueryTranslator q) throws QueryException { String lctoken = token.toLowerCase(); if (first) { first = false; if ( lctoken.equals("distinct") ) { q.setDistinct(true); return; } else if ( lctoken.equals("all") ) { q.setDistinct(false); return; } } if (afterNew) { afterNew=false; holderClass = q.getImportedClass(token); if (holderClass==null) throw new QueryException("class not found: " + token); q.setHolderClass(holderClass); } else if ( token.equals(StringHelper.COMMA) ) { if (ready) throw new QueryException("alias or expression expected in SELECT"); q.appendScalarSelectToken(StringHelper.COMMA_SPACE); ready=true; } else if ( "new".equals(lctoken) ) { afterNew=true; ready=false; } else if ( StringHelper.OPEN_PAREN.equals(token) ) { if (!aggregate && holderClass!=null && !ready) { //opening paren in new Foo ( ... ) ready=true; } else if (aggregate) { q.appendScalarSelectToken(token); } else { throw new QueryException("aggregate function expected before ( in SELECT"); } ready = true; } else if ( StringHelper.CLOSE_PAREN.equals(token) ) { if (holderClass!=null && !ready) { //closing paren in new Foo ( ... ) } else if (aggregate && ready) { q.appendScalarSelectToken(token); } else { throw new QueryException("( expected before ) in select"); } count=false; aggregate = false; ready = false; } else if ( countArguments.contains(lctoken) ) { if ( !ready || !aggregate ) throw new QueryException( token + " only allowed inside aggregate function in SELECT"); q.appendScalarSelectToken(token); } else if ( aggregateFunctions.contains(lctoken) ) { if (!ready) throw new QueryException(", expected before aggregate function in SELECT: " + token); if ( lctoken.equals("count") ) { q.addSelectScalar(Hibernate.INTEGER); //must be handled differently 'cos of count(*) count = true; } else if ( lctoken.equals("avg") ) { avg = true; } // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) else if( lctoken.equals("sum") ) { sum = true; } // End change : Hugh Leather 10.07.2003 (See comment at top of file) aggregate = true; ready = false; q.appendScalarSelectToken(token); } else if (aggregate) { if (!ready) throw new QueryException("( expected after aggregate function in SELECT"); ParserHelper.parse(aggregatePathExpressionParser, q.unalias(token), ParserHelper.PATH_SEPARATORS, q); if ( aggregatePathExpressionParser.isCollectionValued() ) { q.addCollection( aggregatePathExpressionParser.getCollectionName(), aggregatePathExpressionParser.getCollectionRole() ); } q.appendScalarSelectToken( aggregatePathExpressionParser.getWhereColumn() ); if (!count) q.addSelectScalar( aggregateType( aggregatePathExpressionParser.getWhereColumnType(), q ) ); aggregatePathExpressionParser.addAssociation(q); } else { if (!ready) throw new QueryException(", expected in SELECT"); ParserHelper.parse(pathExpressionParser, q.unalias(token), ParserHelper.PATH_SEPARATORS, q); if ( pathExpressionParser.isCollectionValued() ) { q.addCollection( pathExpressionParser.getCollectionName(), pathExpressionParser.getCollectionRole() ); } else if ( pathExpressionParser.getWhereColumnType().isEntityType() ) { q.addSelectClass( pathExpressionParser.getSelectName() ); } q.appendScalarSelectTokens( pathExpressionParser.getWhereColumns() ); q.addSelectScalar( pathExpressionParser.getWhereColumnType() ); pathExpressionParser.addAssociation(q); ready = false; } } public Type aggregateType(Type type, QueryTranslator q) throws QueryException { if (count) { throw new AssertionFailure("count(*) must be handled differently"); } else if (avg) { int[] sqlTypes; try { sqlTypes = type.sqlTypes(q.factory); } catch (MappingException me) { throw new QueryException(me); } if (sqlTypes.length!=1) throw new QueryException("multi-column type in avg()"); int sqlType = sqlTypes[0]; if ( sqlType==Types.INTEGER || sqlType==Types.BIGINT || sqlType==Types.TINYINT ) { return Hibernate.FLOAT; } else { return type; } } // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) else if (sum) { if (type instanceof BooleanType) { return Hibernate.INTEGER; } else { return type; } } // End change : Hugh Leather 10.07.2003 (See comment at top of file) else { return type; } } public void start(QueryTranslator q) { ready=true; first=true; aggregate=false; count = false; avg = false; afterNew = false; holderClass = null; } public void end(QueryTranslator q) { } } --------------------------------------------------------------------- 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-07-12 06:11:46
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 1:11 AM This is a huge architectural change and does not seem that useful, really. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-159 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-159 Summary: Trans-database Support Type: New Feature Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Reporter: Christian Bauer Created: Tue, 8 Jul 2003 3:38 PM Updated: Sat, 12 Jul 2003 1:11 AM Description: Ability to define an object model, and specify that some classes live in database A, and some live in database B. Hibernate should assume that it can not join between the databases and, in fact, the databases may be from different vendors. I know this can be done by creating multiple Sessions, but I don't think this will make trans-database relationships work. That is, I need to be able to have 1-1 and 1-M relationships defined between objects that live in two different databases. When Hibernate goes to lazily initialize a 1-1 or 1-M relationship, it needs to be able to do so using a Connection connected to the appropriate database. If M-M can be achieved, as well, so much the better (will require specification of which database the M-M table lives in, I believe.) Goal is that a single Session can be used to obtain objects and resulting objects' relationships all work, even though they may be using Connections from the other database. --------------------------------------------------------------------- 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-07-12 06:08:52
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 1:08 AM This belongs in XDoclet JIRA --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-170 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-170 Summary: Ablility to generate map file with assigned date as primary key using xdoclet Type: Bug Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: Dan Tran Created: Thu, 10 Jul 2003 12:27 AM Updated: Sat, 12 Jul 2003 1:08 AM Environment: XDoclet 1.2 beta3 Description: The following class with hibernte tag generates exception when feeding thru xdoclet to generate hbm.xml file package org.glvnsjc.model; /** * @author Dan Tran * @hibernate.class table="day" */ public class Day implements java.io.Serializable { private java.util.Date day; public Day() { } /** * @hibernate.id generator-class="assigned" */ public java.util.Date getDay() { return this.day; } public void setDay(java.util.Date value) { this.day = value; } } here is the stack trace hibernatedoclet] Generating mapping file for org.glvnsjc.model.Day. [hibernatedoclet] org.glvnsjc.model.Day [hibernatedoclet] (TemplateEngine.invokeMethod 541 ) Invoking method fai led: xdoclet.modules.hibernate.HibernateTagsHandler.ifHasCompositeId, line=100 o f template file: jar:file:C:\dev\thirdparty\sourceforge\xdoclet\lib\xdoclet-hibe rnate-module-1.2b4.jar!/xdoclet/modules/hibernate/resources/hibernate.xdt [hibernatedoclet] java.lang.reflect.InvocationTargetException [hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M ethod) --------------------------------------------------------------------- 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-07-12 06:08:44
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 1:07 AM (1) this is not a bug (2) it belongs in XDoclet JIRA resubmit it there, if you like, but I think that this is much better addressed with a merge file. It is a problem with the whole XDoclet notion, not the Hibernate module. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-171 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-171 Summary: Ability to generate map of 2 components of the same type in one class using xdoclet Type: Bug Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: Dan Tran Created: Thu, 10 Jul 2003 12:32 AM Updated: Sat, 12 Jul 2003 1:07 AM Environment: xdoclet 1.2 beta3 Description: I would like to define 2 components of the same type in one class. Current Hibernte-xdoclet does not support this configuration. Here is an example with my desired map output <component name="name" class="org.glvnsjc.model.Name"> <property name="lastNameRaw" column="lastName" type="string"/> <property name="middleNameRaw" column="middleName" type="string"/> <property name="firstNameRaw" column="firstName" type="string"/> </component> <component name="parentName" class="org.glvnsjc.model.Name"> <property name="lastNameRaw" column="parentLastName" type="string"/> <property name="middleNameRaw" column="parentMiddleName" type="string"/> <property name="firstNameRaw" column="parentFirstName" type="string"/> </component> --------------------------------------------------------------------- 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-07-12 06:06:44
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 1:05 AM Done. (The proposed "sorting" is impossible, in general. It only works if there are no circularities, which is unusual.) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-180 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-180 Summary: SchemaExport drop broken for Postgresql Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Fix Fors: 2.0.2 Versions: 2.0 final Assignee: Reporter: Chris Nokleberg Created: Thu, 10 Jul 2003 10:45 PM Updated: Sat, 12 Jul 2003 1:05 AM Description: Since PostgreSQLDialect.getCascadeConstraintsString was changed to return "", it is now necessary for dropConstraints to return true. Alternatively, Configuration.generateDropSchemaScript should sort the tables by foreign key constraints and drop in the correct order, avoiding any need to cascade. --------------------------------------------------------------------- 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-07-12 06:04:53
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 1:04 AM committed, with minor adjustment --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-166 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-166 Summary: firebird dialect with support for LIMIT Type: Patch Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.0.2 Versions: 2.0.1 Assignee: Gavin King Reporter: Christian Bauer Created: Tue, 8 Jul 2003 3:48 PM Updated: Sat, 12 Jul 2003 1:04 AM Description: Ludovic Orban tested with firebird 1.0.2 and JayBird type 4 driver (Patch got lost during JIRA downtime, Christian) --------------------------------------------------------------------- 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-07-12 05:57:43
|
The following comment has been added to this issue: Author: Gavin King Created: Sat, 12 Jul 2003 12:56 AM Body: Hmmm. not a bad idea.... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-176 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-176 Summary: Allow for Dialect specific seperator between schema and table name Type: Patch Status: Unassigned Priority: Trivial Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Reporter: Chris Hane Created: Thu, 10 Jul 2003 3:02 PM Updated: Thu, 10 Jul 2003 3:05 PM Description: I'm on the receiving end of a Hibernate mapping file(s) that use the schema attributes. However, I am using MySQL which does not support schema (at least with the dot notation). I added to Dialect: getSchemaSeperator which will supply the default seperator found in Table (StringHelper.DOT). In MySQLDialect I overrode this function to provide StringHelper.UNDERSCORE I modified Table to use the new attribute from Dialect in getQualifiedName() The source I modified was the latest (2003-07-10) pulled from CVS. Chris.... --------------------------------------------------------------------- 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-07-12 05:55:43
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 12 Jul 2003 12:55 AM This is intended functionality (for performance we don't include the discriminator). You can force the behaviour you desire by adding a where attribute the the collection mapping. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-175 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-175 Summary: One-to-many association does not correctly discriminate when a subclass is specified Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Reporter: Peachawat Peachavanish Created: Thu, 10 Jul 2003 1:49 PM Updated: Sat, 12 Jul 2003 12:55 AM Environment: Gentoo Linux, Sun Java 1.4.1 Description: When using one-to-many association from 'Parent' to 'SubChild_1' and 'SubChild_2' where 'SubChild_1' and 'SubChild_2' are subclasses of 'Child', the generated SQL for hydrating a 'Parent' does not appropriate include 'where' clause to discriminate 'SubChild_1' or 'SubChild_2'. Class Declaration ================= 'Child.java' public abstract class Child{} 'SubChild_1.java' public class SubChild_1 extends Child {} 'SubChild_2.java' public class SubChild_2 extends Child {} 'Parent.java' public class Parent { private List subChilds_1 = new ArrayList(); private List subChilds_2 = new ArrayList(); } Mapping ======= 'Child.hbm.xml' <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="Child" discriminator-value="_"> <id name="id"> <generator class="native"/> </id> <discriminator column="CHILDTYPE"/> <property name="aProperty"/> <subclass name="SubChild_1" discriminator-value="1"/> <subclass name="SubChild_2" discriminator-value="2"/> </class> </hibernate-mapping> 'Parent.hmb.xml' <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="Parent"> <id name="id"> <generator class="native"/> </id> <property name="aProperty"/> <list name="subChilds_1" lazy="false" cascade="all"> <key column="parent_id"/> <index column="idx"/> <one-to-many class="SubChild_1"/> </list> <list name="subChilds_2" lazy="false" cascade="all"> <key column="parent_id"/> <index column="idx"/> <one-to-many class="SubChild_2"/> </list> </class> </hibernate-mapping> Generated SQL when perform session.find() ========================================= Hibernate: select child0_.id as id__, child0_.idx as idx__, child0_.id as id from Child child0_ where child0_.parent_id=? There is no 'where CHILDTYPE=?' discriminating clause. --------------------------------------------------------------------- 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-07-12 04:44:44
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@in...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-182 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-182 Summary: dirtyProperties array incorrect following Interceptor.onFlushDirty Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Versions: 2.0.1 Assignee: Gavin King Reporter: Tom Ward Created: Fri, 11 Jul 2003 2:54 AM Updated: Fri, 11 Jul 2003 11:44 PM Description: As Simon Spero noted in issue HB-4, in SessionImpl.flushEntities, the dirtyProperties array is calculated before Interceptor.onFlushDirty is called. As onFlushDirty has no way of reporting which of the currentState properties it has changed, if onFlushDirty does change a property, the dirtyProperties array will be incorrect. This seems to be an issue in the following scenario - A superclass Super defines an id and a dateModified property, while a subclass Sub defines a commentText property. Sub is mapped as a joined-subclass of Super. An Interceptor is written to change the dateModified property in the currentState to the current date, whenever onFlushDirty is called. The issue is this - if commentText is changed and the object is flushed, the Interceptor correctly modifies the dateModified. This change makes its way back to the instance of Sub, as expected. However, when the time comes to update the object in the database, only the commentText is updated. I believe that this is because as a joined-subclass, Sub is mapped across two tables, but the dirtyProperties array, calculcated before the call to onFlushDirty, only shows a change affecting one of these tables. The ways I've found to work-around this are - 1) If using Interceptors, use a mapping strategy other than joined-subclasses. 2) Implement Interceptor.findDirty to return the properties you know will change in onFlushDirty (if other properties are dirty too). This seems very awkward. For me, the ideal solution would be to change the return type of Interceptor.onFlushDirty to an int[], indicating the properties which have been changed. Then it would be a simple task to calculate the union of this array and dirtyProperties (and maybe even recheck the intersection). I hope this is all helpful - I have read and re-read the javadocs to try and make sure I'm not missing anything, but it is still possible. I'll give as much help as I can trying to fix this. --------------------------------------------------------------------- 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-07-12 04:44:43
|
The following comment has been added to this issue: Author: Gavin King Created: Fri, 11 Jul 2003 11:43 PM Body: Interesting. This does seem to be a bit of a design flaw. It would also be a problem if you use dynamic-update="true". Hmmmm. Good catch. Not sure how to best address this. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-182 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-182 Summary: dirtyProperties array incorrect following Interceptor.onFlushDirty Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.0.1 Assignee: Reporter: Tom Ward Created: Fri, 11 Jul 2003 2:54 AM Updated: Fri, 11 Jul 2003 2:54 AM Description: As Simon Spero noted in issue HB-4, in SessionImpl.flushEntities, the dirtyProperties array is calculated before Interceptor.onFlushDirty is called. As onFlushDirty has no way of reporting which of the currentState properties it has changed, if onFlushDirty does change a property, the dirtyProperties array will be incorrect. This seems to be an issue in the following scenario - A superclass Super defines an id and a dateModified property, while a subclass Sub defines a commentText property. Sub is mapped as a joined-subclass of Super. An Interceptor is written to change the dateModified property in the currentState to the current date, whenever onFlushDirty is called. The issue is this - if commentText is changed and the object is flushed, the Interceptor correctly modifies the dateModified. This change makes its way back to the instance of Sub, as expected. However, when the time comes to update the object in the database, only the commentText is updated. I believe that this is because as a joined-subclass, Sub is mapped across two tables, but the dirtyProperties array, calculcated before the call to onFlushDirty, only shows a change affecting one of these tables. The ways I've found to work-around this are - 1) If using Interceptors, use a mapping strategy other than joined-subclasses. 2) Implement Interceptor.findDirty to return the properties you know will change in onFlushDirty (if other properties are dirty too). This seems very awkward. For me, the ideal solution would be to change the return type of Interceptor.onFlushDirty to an int[], indicating the properties which have been changed. Then it would be a simple task to calculate the union of this array and dirtyProperties (and maybe even recheck the intersection). I hope this is all helpful - I have read and re-read the javadocs to try and make sure I'm not missing anything, but it is still possible. I'll give as much help as I can trying to fix this. --------------------------------------------------------------------- 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-07-12 04:39:43
|
Message: The following issue has been closed. Resolver: Gavin King Date: Fri, 11 Jul 2003 11:39 PM One of The Rules is that you can't keep working with a Session after it throws an exception. There are some very pathalogical things that can happen and there is basically no way that we can ensure that the internal session state is synchronized with the database state after an exception. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-185 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-185 Summary: flush() does not cleanup after a SQLException Type: Bug Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Reporter: Dave White Created: Fri, 11 Jul 2003 2:07 PM Updated: Fri, 11 Jul 2003 11:39 PM Description: I have a object mapped with a composite-id. In the database, there is a unique composite index against the columns that make up the composite-id. I've found that when I do the following: try { session.save(foo); // where foo is the object with the composite-id session.flush(); // Do some other work with session } finally { session.flush(); session.close(); } that if a SQLException is thrown in the first session.flush (because the insert statement violated the unique constraint of the index), the second flush throws the same exception. The means that the flush() call doesn't cleanup the "things to be done" in the case that an exception is thrown during the flushing process. Specifically, I found the following in SessionImpl. private void executeAll(Iterator iter) throws SQLException, HibernateException { while ( iter.hasNext() ) { Executable e = (Executable) iter.next(); executions.add(e); e.execute(); iter.remove(); if ( batcher!=null ) batcher.executeBatch(); } } I'm wondering if perhaps it would be better if this was: private void executeAll(Iterator iter) throws SQLException, HibernateException { while ( iter.hasNext() ) { Executable e = (Executable) iter.next(); executions.add(e); try { e.execute(); } finally { iter.remove(); } if ( batcher!=null ) batcher.executeBatch(); } } After making this change in my local source tree, the problem I descrived above was fixed. --------------------------------------------------------------------- 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-07-12 04:33:43
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-181 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-181 Summary: ClassCast with SortedSet Type: Bug Status: Closed Priority: Major Resolution: DUPLICATE Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Gavin King Reporter: Gavin King Created: Fri, 11 Jul 2003 12:16 AM Updated: Fri, 11 Jul 2003 11:33 PM Environment: Reported by Jason Horne Description: https://sourceforge.net/forum/message.php?msg_id=1875250 I'm not sure if this is related, but we are getting a ClassCastException because TreeMap is trying to cast our objects into Comparables since it can't find a Comparator. We defined a comparator, though, and it looks like it's copied most of the time. However, it looks like this constructor for SortedSet: public SortedSet(SessionImplementor session, java.util.SortedSet set) { super(session, set); } ...should copy the comparator as well. When this constructor is called by SortedSetType.wrap(...), the comparator isn't copied to the hibernate SortedSet class from the java.util.SortedSet class. --------------------------------------------------------------------- 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-07-12 04:15:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Fri, 11 Jul 2003 11:15 PM I applied this patch --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-169 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-169 Summary: FK to class with composite PK Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.0.2 Versions: 2.0.1 Assignee: Gavin King Reporter: Gavin King Created: Wed, 9 Jul 2003 6:37 PM Updated: Fri, 11 Jul 2003 11:15 PM Description: https://sourceforge.net/forum/forum.php?thread_id=894732&forum_id=128638 I think I found the cause. NormalisedEntityPersister.postInstantiate() seems to lack knowledge of composite objects within ID types (doesn't use getColumnSpan()). By adding / replacing the following code (from EntityPersister) I got it to work: ... Type[] subtypes = actype.getSubtypes(); ... int j = 0; for (int i = 0; i < props.length; i++) { String subidpath = idpath + StringHelper.DOT + props[i]; String[] componentColumns = new String[subtypes[i].getColumnSpan(factory)]; for (int k = 0; k < componentColumns.length; k++) { componentColumns[k] = columns[j++]; } columnNamesByPropertyPath.put(subidpath, componentColumns); mods.put(subidpath, actype.getSubtypes()[i]); } --------------------------------------------------------------------- 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-07-12 04:00:43
|
Message: The following issue has been closed. Resolver: Gavin King Date: Fri, 11 Jul 2003 11:00 PM This is now fixed in CVS --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-179 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-179 Summary: Query collection in component Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.0.2 Versions: 2.0.1 Assignee: Gavin King Reporter: Gavin King Created: Thu, 10 Jul 2003 9:07 PM Updated: Fri, 11 Jul 2003 11:00 PM Environment: From Rex Madden Description: http://sourceforge.net/forum/message.php?msg_id=2073580 I'm switching to 2.0.1 from 1.2.3. I received the following error trying to do a query on a collection that's within a component. Obviously, this used to work in 1.2.3. I've included part of my mapping below. Any advice on how to get this to work would be appreciated. net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class com.fetchaflick.videotest.movie.Movie WHERE :findTarget in mov.cast.cast.list.elements AND mov.status >= :status ORDER BY mov.nakedTitle desc] at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:223) at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:270) at net.sf.hibernate.hql.WhereParser.preprocess(WhereParser.java:347) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:355) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:389) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:275) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73) at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120) at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:145) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:373) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:351) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1381) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1345) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) at com.fetchaflick.videotest.ojb.FetchaQuery.list(FetchaQuery.java:45) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageBy(BaseMovieFinder.java:62) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageByActor(BaseMovieFinder.java:45) at com.fetchaflick.videotest.movie.MovieFinderTest.testFindByActor(MovieFinderTest.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <class name="com.fetchaflick.videotest.movie.Product" table="PRODUCT"> <jcs-cache usage="read-write"/> <id name="id" column="id" type="long" unsaved-value="0"> <generator class="assigned"/> </id> <discriminator column="TYPE"/> <version column="version" name="version" type="integer"/> <property name="status" column="STATUS" type="com.fetchaflick.videotest.ojb.ProductStatusFieldConversion"/> <many-to-one name="priceLevel" column="PRICE_LEVEL_ID" class="com.fetchaflick.videotest.movie.PriceLevel" cascade="none" outer-join="auto"/> <subclass name="com.fetchaflick.videotest.movie.BaseMovie" discriminator-value="basemovie"> <property name="releaseDate" column="RELEASE_DATE"/> <property name="nakedTitle" column="NAKED_TITLE"/> <many-to-one name="releaseType" column="RELEASE_TYPE_ID" class="com.fetchaflick.videotest.movie.ReleaseType" cascade="none" /> <component name="cast" class="com.fetchaflick.videotest.movie.Cast"> <component name="cast" class="com.fetchaflick.videotest.movie.SafeList"> <list name="list" table="MOVIE_CAST" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <element type="string" column="NAME"/> </list> </component> </component> <subclass name="com.fetchaflick.videotest.movie.AdultMovie" discriminator-value="adult"> <property name="studio" column="STUDIO"/> </subclass> <subclass name="com.fetchaflick.videotest.movie.Movie" discriminator-value="movie"> <component name="criticReviews" class="com.fetchaflick.videotest.movie.CriticReviewList"> <component name="reviews" class="com.fetchaflick.videotest.movie.SafeList"> <list name="list" table="MOVIE_CRITIC_REVIEWS" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <composite-element class="com.fetchaflick.videotest.movie.CriticReview"> <property name="author" column="AUTHOR"/> <property name="link" column="LINK"/> <property name="publication" column="PUBLICATION"/> <property name="rating" type="com.fetchaflick.videotest.ojb.CriticReviewRatingFieldConversion"> <column name="RATING"/> <column name="RATING_MAX"/> </property> <property name="synopsis" column="SYNOPSIS"/> </composite-element> </list> </component> </component> </subclass> </subclass> </class> --------------------------------------------------------------------- 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 |