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-09-01 13:01:30
|
Message: The following issue has been closed. Resolver: Christian Bauer Date: Mon, 1 Sep 2003 7:59 AM Closed. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-303 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-303 Summary: [hibernate.org] Use PNG images Type: Improvement Status: Closed Priority: Trivial Resolution: FIXED Project: Hibernate2 Assignee: Reporter: Emmanuel Bourg Created: Mon, 1 Sep 2003 7:27 AM Updated: Mon, 1 Sep 2003 7:59 AM Description: The Hibernate logo use a GIF image, as an open source project i think Hibernate should use free formats and replace GIFs with PNG files. --------------------------------------------------------------------- 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-09-01 12:45:28
|
The following comment has been added to this issue: Author: Marko Nikolic Created: Mon, 1 Sep 2003 7:43 AM Body: Well, then 'Lightweight Class' should be removed from documentation ;) What is the way to do something similar? Maybe including blob column in select does not impact performance so much if you don't use Blob.getBinaryStream() on it? Is stream to blob opened when you issue select, or only when you ask for stream, or is that depending on jdbc driver implementation? --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-301 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-301 Summary: Lightweight design pattern does not work (WrongClassException) Type: Patch Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 Assignee: Reporter: Marko Nikolic Created: Sun, 31 Aug 2003 10:31 AM Updated: Mon, 1 Sep 2003 6:23 AM Environment: Windows XP, JDK 1.4.2, Jetty 4.2.3 Description: I am having problem using Lightweight design pattern. I must admit that I am completely new to Hibernate but it seems to me like this is a bug of Hibernate. Here are my mappings: ### FileInfo.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="com.redstarshop.data.FileInfo" table="files"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> </class> </hibernate-mapping> ### File.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="com.redstarshop.data.File" table="files" polymorphism="explicit"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> <property name="content" not-null="true"/> </class> </hibernate-mapping> ### End of mappings ### Now, loading FileInfo (lightweight) entity works fine. But if I try to load File (heavyweight) entity (after FileInfo was loaded and cached) with the same id as loaded FileInfo, using either: session.load(File.class, id) or session.find("from com.redstarshop.data.File as c where c.id = ?", id, Hibernate.LONG) I always get net.sf.hibernate.WrongClassException: Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class) at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:300) at net.sf.hibernate.loader.Loader.getRow(Loader.java:278) at net.sf.hibernate.loader.Loader.doFind(Loader.java:159) at net.sf.hibernate.loader.Loader.find(Loader.java:620) at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1318) at com.redstarshop.util.Utils.findOne(Utils.java:46) at com.redstarshop.tapestry.FileService.service(FileService.java:116) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:913) at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238) at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:341) at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:148) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:333) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:285) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1696) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:552) at org.mortbay.http.HttpContext.handle(HttpContext.java:1646) at org.mortbay.http.HttpServer.service(HttpServer.java:884) at org.mortbay.http.HttpConnection.service(HttpConnection.java:799) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:949) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:816) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:204) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:509) Following patch against 2.0.3 works fine for me (I patched loader to use fetched instance only if it is assignable to requested type). ### Begin of patch ### --- /cygdrive/c/java/hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-27 16:49:40.000000000 +0200 +++ hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-31 17:03:34.000000000 +0200 @@ -273,7 +273,7 @@ public abstract class Loader { //If the object is already loaded, return the loaded one object = session.getEntity(key); - if (object!=null) { + if (object!=null && persisters[i].getMappedClass().isAssignableFrom(object.getClass())) { //its already loaded so don't need to hydrate it instanceAlreadyLoaded(rs, i, persisters[i], suffixes[i], key, object, lockModes[i], session); } @@ -296,9 +296,6 @@ public abstract class Loader { private void instanceAlreadyLoaded(ResultSet rs, int i, Loadable persister, String suffix, Key key, Object object, LockMode lockMode, SessionImplementor session) throws HibernateException, SQLException { - if ( !persister.getMappedClass().isAssignableFrom( object.getClass() ) ) - throw new WrongClassException( "loaded object was of wrong class", key.getIdentifier(), persister.getMappedClass() ); - if ( LockMode.NONE!=lockMode && upgradeLocks() ) { //no point doing this if NONE was requested if ( ### End of patch ### --------------------------------------------------------------------- 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-09-01 12:30:27
|
The following issue has been updated: Updater: Emmanuel Bourg (mailto:sm...@lf...) Date: Mon, 1 Sep 2003 7:28 AM Comment: PNG version of the GIF logo, 20% space saved over the original. Changes: Attachment changed to hibernate_logo.png --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-303&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-303 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-303 Summary: [hibernate.org] Use PNG images Type: Improvement Status: Unassigned Priority: Trivial Project: Hibernate2 Assignee: Reporter: Emmanuel Bourg Created: Mon, 1 Sep 2003 7:27 AM Updated: Mon, 1 Sep 2003 7:28 AM Description: The Hibernate logo use a GIF image, as an open source project i think Hibernate should use free formats and replace GIFs with PNG files. --------------------------------------------------------------------- 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-09-01 12:28:27
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-303 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-303 Summary: [hibernate.org] Use PNG images Type: Improvement Status: Unassigned Priority: Trivial Project: Hibernate2 Assignee: Reporter: Emmanuel Bourg Created: Mon, 1 Sep 2003 7:27 AM Updated: Mon, 1 Sep 2003 7:27 AM Description: The Hibernate logo use a GIF image, as an open source project i think Hibernate should use free formats and replace GIFs with PNG files. --------------------------------------------------------------------- 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-09-01 11:24:28
|
Message: The following issue has been closed. Resolver: Gavin King Date: Mon, 1 Sep 2003 6:23 AM This is not a bug. This is correct behaviour. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-301 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-301 Summary: Lightweight design pattern does not work (WrongClassException) Type: Patch Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 Assignee: Reporter: Marko Nikolic Created: Sun, 31 Aug 2003 10:31 AM Updated: Mon, 1 Sep 2003 6:23 AM Environment: Windows XP, JDK 1.4.2, Jetty 4.2.3 Description: I am having problem using Lightweight design pattern. I must admit that I am completely new to Hibernate but it seems to me like this is a bug of Hibernate. Here are my mappings: ### FileInfo.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="com.redstarshop.data.FileInfo" table="files"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> </class> </hibernate-mapping> ### File.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="com.redstarshop.data.File" table="files" polymorphism="explicit"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> <property name="content" not-null="true"/> </class> </hibernate-mapping> ### End of mappings ### Now, loading FileInfo (lightweight) entity works fine. But if I try to load File (heavyweight) entity (after FileInfo was loaded and cached) with the same id as loaded FileInfo, using either: session.load(File.class, id) or session.find("from com.redstarshop.data.File as c where c.id = ?", id, Hibernate.LONG) I always get net.sf.hibernate.WrongClassException: Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class) at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:300) at net.sf.hibernate.loader.Loader.getRow(Loader.java:278) at net.sf.hibernate.loader.Loader.doFind(Loader.java:159) at net.sf.hibernate.loader.Loader.find(Loader.java:620) at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1318) at com.redstarshop.util.Utils.findOne(Utils.java:46) at com.redstarshop.tapestry.FileService.service(FileService.java:116) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:913) at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238) at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:341) at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:148) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:333) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:285) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1696) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:552) at org.mortbay.http.HttpContext.handle(HttpContext.java:1646) at org.mortbay.http.HttpServer.service(HttpServer.java:884) at org.mortbay.http.HttpConnection.service(HttpConnection.java:799) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:949) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:816) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:204) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:509) Following patch against 2.0.3 works fine for me (I patched loader to use fetched instance only if it is assignable to requested type). ### Begin of patch ### --- /cygdrive/c/java/hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-27 16:49:40.000000000 +0200 +++ hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-31 17:03:34.000000000 +0200 @@ -273,7 +273,7 @@ public abstract class Loader { //If the object is already loaded, return the loaded one object = session.getEntity(key); - if (object!=null) { + if (object!=null && persisters[i].getMappedClass().isAssignableFrom(object.getClass())) { //its already loaded so don't need to hydrate it instanceAlreadyLoaded(rs, i, persisters[i], suffixes[i], key, object, lockModes[i], session); } @@ -296,9 +296,6 @@ public abstract class Loader { private void instanceAlreadyLoaded(ResultSet rs, int i, Loadable persister, String suffix, Key key, Object object, LockMode lockMode, SessionImplementor session) throws HibernateException, SQLException { - if ( !persister.getMappedClass().isAssignableFrom( object.getClass() ) ) - throw new WrongClassException( "loaded object was of wrong class", key.getIdentifier(), persister.getMappedClass() ); - if ( LockMode.NONE!=lockMode && upgradeLocks() ) { //no point doing this if NONE was requested if ( ### End of patch ### --------------------------------------------------------------------- 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-09-01 08:26:28
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-302 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-302 Summary: hbm2java: use-in-tostring for discriminator Type: New Feature Status: Unassigned Priority: Trivial Project: Hibernate2 Components: toolset Assignee: Reporter: John Meredith Created: Mon, 1 Sep 2003 3:26 AM Updated: Mon, 1 Sep 2003 3:26 AM Description: Only a conveniece ie: <discriminator column="subclass" type="string"> <meta attribute="use-in-tostring">true</meta> </discriminator> - John --------------------------------------------------------------------- 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-09-01 06:15:30
|
The following comment has been added to this issue: Author: David Channon Created: Mon, 1 Sep 2003 1:14 AM Body: I cannot replicate this issue. I have added my tests for the dialect function enhancements back into the downloaded latest CVS src from v21branch. A simple new works fine and new using a join as described works fine. All other select parser tests pass fine as well. I have sent an email to Thilo to get extra information. In a few days, unless further info from Thilo demonstrates a defect, I would consider closing this JIRA report as 'unable to replicate' or whatever is appropriate. Questions: 1) Should I test against other versions of the software. 2) Noticed CVS src not have my tests for the new Dialect functions included. Do you want me to submit the patch once again. I do think it should be included as a part of the basic SQL function test suite. I will change the hsqldb dilect to include additional functions. This will allow the stock release system test runs to include testing the extended dialect functionality. This assumes the additional tests will be commited CVS. --David. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-300 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-300 Summary: select new Foo(...) does not work (was ok in 2.0.1) Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: David Channon Reporter: Thilo Jahke Created: Fri, 29 Aug 2003 8:28 AM Updated: Fri, 29 Aug 2003 2:01 PM Description: The simple HQL Query select new Foo(i.name, a.street, ...) from person i left outer join address a ... did work fine in Hibernate 2.0.1 but not in the newer versions. I get the error net.sf.hibernate.QueryException: undefined alias: i Thilo --------------------------------------------------------------------- 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-08-31 15:58:28
|
The following comment has been added to this issue: Author: Marko Nikolic Created: Sun, 31 Aug 2003 10:58 AM Body: Unfortunately, this patch works only for session.find, in order to make session.load work I guess that SessionImpl should be patched too. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-301 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-301 Summary: Lightweight design pattern does not work (WrongClassException) Type: Patch Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 Assignee: Reporter: Marko Nikolic Created: Sun, 31 Aug 2003 10:31 AM Updated: Sun, 31 Aug 2003 10:31 AM Environment: Windows XP, JDK 1.4.2, Jetty 4.2.3 Description: I am having problem using Lightweight design pattern. I must admit that I am completely new to Hibernate but it seems to me like this is a bug of Hibernate. Here are my mappings: ### FileInfo.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="com.redstarshop.data.FileInfo" table="files"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> </class> </hibernate-mapping> ### File.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="com.redstarshop.data.File" table="files" polymorphism="explicit"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> <property name="content" not-null="true"/> </class> </hibernate-mapping> ### End of mappings ### Now, loading FileInfo (lightweight) entity works fine. But if I try to load File (heavyweight) entity (after FileInfo was loaded and cached) with the same id as loaded FileInfo, using either: session.load(File.class, id) or session.find("from com.redstarshop.data.File as c where c.id = ?", id, Hibernate.LONG) I always get net.sf.hibernate.WrongClassException: Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class) at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:300) at net.sf.hibernate.loader.Loader.getRow(Loader.java:278) at net.sf.hibernate.loader.Loader.doFind(Loader.java:159) at net.sf.hibernate.loader.Loader.find(Loader.java:620) at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1318) at com.redstarshop.util.Utils.findOne(Utils.java:46) at com.redstarshop.tapestry.FileService.service(FileService.java:116) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:913) at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238) at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:341) at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:148) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:333) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:285) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1696) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:552) at org.mortbay.http.HttpContext.handle(HttpContext.java:1646) at org.mortbay.http.HttpServer.service(HttpServer.java:884) at org.mortbay.http.HttpConnection.service(HttpConnection.java:799) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:949) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:816) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:204) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:509) Following patch against 2.0.3 works fine for me (I patched loader to use fetched instance only if it is assignable to requested type). ### Begin of patch ### --- /cygdrive/c/java/hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-27 16:49:40.000000000 +0200 +++ hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-31 17:03:34.000000000 +0200 @@ -273,7 +273,7 @@ public abstract class Loader { //If the object is already loaded, return the loaded one object = session.getEntity(key); - if (object!=null) { + if (object!=null && persisters[i].getMappedClass().isAssignableFrom(object.getClass())) { //its already loaded so don't need to hydrate it instanceAlreadyLoaded(rs, i, persisters[i], suffixes[i], key, object, lockModes[i], session); } @@ -296,9 +296,6 @@ public abstract class Loader { private void instanceAlreadyLoaded(ResultSet rs, int i, Loadable persister, String suffix, Key key, Object object, LockMode lockMode, SessionImplementor session) throws HibernateException, SQLException { - if ( !persister.getMappedClass().isAssignableFrom( object.getClass() ) ) - throw new WrongClassException( "loaded object was of wrong class", key.getIdentifier(), persister.getMappedClass() ); - if ( LockMode.NONE!=lockMode && upgradeLocks() ) { //no point doing this if NONE was requested if ( ### End of patch ### --------------------------------------------------------------------- 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-08-31 15:32:34
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-301 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-301 Summary: Lightweight design pattern does not work (WrongClassException) Type: Patch Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 Assignee: Reporter: Marko Nikolic Created: Sun, 31 Aug 2003 10:31 AM Updated: Sun, 31 Aug 2003 10:31 AM Environment: Windows XP, JDK 1.4.2, Jetty 4.2.3 Description: I am having problem using Lightweight design pattern. I must admit that I am completely new to Hibernate but it seems to me like this is a bug of Hibernate. Here are my mappings: ### FileInfo.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="com.redstarshop.data.FileInfo" table="files"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> </class> </hibernate-mapping> ### File.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="com.redstarshop.data.File" table="files" polymorphism="explicit"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> <property name="content" not-null="true"/> </class> </hibernate-mapping> ### End of mappings ### Now, loading FileInfo (lightweight) entity works fine. But if I try to load File (heavyweight) entity (after FileInfo was loaded and cached) with the same id as loaded FileInfo, using either: session.load(File.class, id) or session.find("from com.redstarshop.data.File as c where c.id = ?", id, Hibernate.LONG) I always get net.sf.hibernate.WrongClassException: Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class) at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:300) at net.sf.hibernate.loader.Loader.getRow(Loader.java:278) at net.sf.hibernate.loader.Loader.doFind(Loader.java:159) at net.sf.hibernate.loader.Loader.find(Loader.java:620) at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1318) at com.redstarshop.util.Utils.findOne(Utils.java:46) at com.redstarshop.tapestry.FileService.service(FileService.java:116) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:913) at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238) at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:341) at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:148) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:333) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:285) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1696) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:552) at org.mortbay.http.HttpContext.handle(HttpContext.java:1646) at org.mortbay.http.HttpServer.service(HttpServer.java:884) at org.mortbay.http.HttpConnection.service(HttpConnection.java:799) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:949) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:816) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:204) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:509) Following patch against 2.0.3 works fine for me (I patched loader to use fetched instance only if it is assignable to requested type). ### Begin of patch ### --- /cygdrive/c/java/hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-27 16:49:40.000000000 +0200 +++ hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-31 17:03:34.000000000 +0200 @@ -273,7 +273,7 @@ public abstract class Loader { //If the object is already loaded, return the loaded one object = session.getEntity(key); - if (object!=null) { + if (object!=null && persisters[i].getMappedClass().isAssignableFrom(object.getClass())) { //its already loaded so don't need to hydrate it instanceAlreadyLoaded(rs, i, persisters[i], suffixes[i], key, object, lockModes[i], session); } @@ -296,9 +296,6 @@ public abstract class Loader { private void instanceAlreadyLoaded(ResultSet rs, int i, Loadable persister, String suffix, Key key, Object object, LockMode lockMode, SessionImplementor session) throws HibernateException, SQLException { - if ( !persister.getMappedClass().isAssignableFrom( object.getClass() ) ) - throw new WrongClassException( "loaded object was of wrong class", key.getIdentifier(), persister.getMappedClass() ); - if ( LockMode.NONE!=lockMode && upgradeLocks() ) { //no point doing this if NONE was requested if ( ### End of patch ### --------------------------------------------------------------------- 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-08-31 08:08:28
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sun, 31 Aug 2003 3:07 AM Quote from the Hibernate API documentation: onLoad() may be used to initialize transient properties of the object from its persistent state. It may not be used to load dependent objects since the Session interface may not be invoked from inside this method. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HBI-6 Here is an overview of the issue: --------------------------------------------------------------------- Key: HBI-6 Summary: ClassCastException when using query.iterate() but works with query.list().iterator() Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate 1.2 Assignee: Reporter: Noel Kee Created: Sun, 22 Jun 2003 4:07 AM Updated: Sun, 31 Aug 2003 3:07 AM Environment: Mandrake Linux 9.1, DB2 V7.2, Sun's J2SDK 1.4.1_02, Hibernate 1.2.4 (same situation with Hibernate 1.2.5) Description: A simple query, "from c in class itr.Product" throws a ClassCastException" when used with query.iterate(). If query.list().iterator() is used instead, it works fine. The ClassCastException occured, when hibernate attempts to retrieve an associated class in the (itr.Pricing) in a bag and tries to cast the bag to a Long. The complete set of java source, mapping and ddl is attached. --------------------------------------------------------------------- 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-08-31 07:36:28
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sun, 31 Aug 2003 2:35 AM development of 1.2 is finished --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HBI-4 Here is an overview of the issue: --------------------------------------------------------------------- Key: HBI-4 Summary: Full feature support for connection pool DBCP Type: Patch Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate 1.2 Assignee: Reporter: Martin Schmidt Created: Thu, 22 May 2003 3:57 AM Updated: Sun, 31 Aug 2003 2:35 AM Description: The following patch extends Hibernate 1.2.5 to support all features of the Apache DBCP connection pool. If a property is not specified, the default value from org.apache.commons.pool.impl.GenericObjectPool (connection pool) or org.apache.commons.pool.impl.GenericKeyedObjectPool (prepared statement cache) is taken. Added configuration parameters to the hibernate.properties file: # Connection pool # Tests of connections hibernate.dbcp.testOnBorrow hibernate.dbcp.testOnReturn # Eviction thread hibernate.dbcp.timeBetweenEvictionRunsMillis hibernate.dbcp.numTestsPerEvictionRun hibernate.dbcp.minEvictableIdleTimeMillis hibernate.dbcp.testWhileIdle # ----------------------------------------------- # Prepared statement cache # Tests of connections hibernate.dbcp.ps.testOnBorrow hibernate.dbcp.ps.testOnReturn # Eviction thread hibernate.dbcp.ps.timeBetweenEvictionRunsMillis hibernate.dbcp.ps.numTestsPerEvictionRun hibernate.dbcp.ps.minEvictableIdleTimeMillis hibernate.dbcp.ps.testWhileIdle -------------------------------------------------- Bug fixed: Although it was possible to configure a validation query for the pool (in Hibernate 1.2.4), this query was never executed, because the DBCP properties "testOnBorrow" or "testOnReturn" were never enabled by the DBCPConnectionProvider. --------------------------------------------------------------------- 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-08-31 07:36:27
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sun, 31 Aug 2003 2:35 AM I won't be changing something like this in 1.2.x stream. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HBI-8 Here is an overview of the issue: --------------------------------------------------------------------- Key: HBI-8 Summary: cirrus.hibernate.collections.Bag needs toString() Type: Improvement Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate 1.2 Assignee: Reporter: Thorbjoern Andersen Created: Wed, 13 Aug 2003 10:23 AM Updated: Sun, 31 Aug 2003 2:35 AM Description: For debugging purposes it is nice to be able to do a println( bean) which works for most Collecion classes, but not for Bag. This snippet works for me: public String toString() { return( "" + bag); } --------------------------------------------------------------------- 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-08-31 07:34:27
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sun, 31 Aug 2003 2:33 AM You would need a different SessionFactory. Development of 1.2.x stream is finished so this will not be implemented. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HBI-7 Here is an overview of the issue: --------------------------------------------------------------------- Key: HBI-7 Summary: Allow mapping class to more than one table/view Type: Improvement Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate 1.2 Assignee: Reporter: Frank Calfo Created: Mon, 28 Jul 2003 10:16 AM Updated: Sun, 31 Aug 2003 2:33 AM Description: I have multiple views that return different results, but all share a common structure I have a class defined to represent one row from the view I can map this class to the view and use a hibernate query to get a collection of objects Now I want to be able to define the second query that returns data from the second view. It seems like I would need to be able to map the same class to a different view but I don't think that will be allowed in Hibernate. For example: Here's the common class mapped to the first view: <class name="ResultSetRow" table="VW_REQUESTS_MANAGER" mutable="false"> <id name="reqId" column="req_id" type="long" unsaved-value="null"> <generator class="assigned"/> </id> <property name="name" column="name" type="string"/> <property name="date" column="date" type="timestamp"/> <property name="type" column="type" type="string"/> </class> and here's the Hibernate query that returns a collection of objects for each row returned by the view: <query name="PendingRequests.ForManager"> from ResultSetRow as list where list.managerId = :manager_id </query> The key issues are these: 1) The structure of each result set will always be the same, only the contents will differ 2) A set of different database views will be created that share the same structure but return different content according to their purpose 3) I'd like to be able to share a common class instead of defining a different class for each different result set 4) I'd like to be able to create a set of mappings for each database view that returns the common class that defines the structure of the result set Can I use a common class and map it to different table/views - or does the rule that one class maps to only one table prevent it ? Thanks! --------------------------------------------------------------------- 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-08-31 07:32:27
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sun, 31 Aug 2003 2:32 AM The correct syntax is alias.person.id.compositIdProperty = ? and .... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HBI-9 Here is an overview of the issue: --------------------------------------------------------------------- Key: HBI-9 Summary: Not being able to query using an object Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate 1.2 Assignee: Reporter: abe zafar Created: Mon, 18 Aug 2003 8:11 PM Updated: Sun, 31 Aug 2003 2:32 AM Description: I have two classes Event and Person and I want to query event based on a Person. I was hoping I would be able to do this: String query = "from com.rhi.domain.impl.Event as event where event.person =?" Since Event is related to Person by a many-to-one relationship I thought Hibernate could create the right sql from the above query. <many-to-one name="person" class="com.rhi.domain.impl.Person"> <meta attribute="property-type">com.rhi.domain.Person</meta> <column name="person_id"/> <column name="person_region_id"/> </many-to-one> But it didn't work and I had to do this: String query = "from com.rhi.domain.impl.Event as event where event.personId = ? and event.personRegionId = ?"; and I also had to add separate mappings for the ids as such so that the query would work: <property name="personId" column="person_id" type="java.lang.Long"/> <property name="personRegionId" column="person_region_id" type="java.lang.Long"/> I wasn't sure if this was a bug or a new feature. If this is a new feature are there plans to implement it? --------------------------------------------------------------------- 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-08-31 07:28:27
|
Message: The following issue has been re-assigned. Assignee: (mailto:) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-34 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-34 Summary: HQL expressions in aggregate functions Type: Improvement Status: Unassigned Priority: Major Project: Hibernate2 Assignee: Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:20 AM Updated: Sun, 31 Aug 2003 2:27 AM Description: HQL expressions in aggregate functions It will be useful to be able to use the expressions in aggregate functions. In Hibernate 2.0 rc1 queries like SELECT sum(o.price * o.quantity) FROM Offer AS o do not work. Generated SQL-query is correct but the number of columns in ResultSet is counted untrue. http://sourceforge.net/tracker/index.php?func=detail&aid=726691&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-08-30 22:38:29
|
Message: The following issue has been re-assigned. Assignee: Max Rydahl Andersen (mailto:xa...@xa...) Assigner: Gavin King (mailto:ga...@in...) Date: Sat, 30 Aug 2003 5:36 PM Comment: reassigning to Max --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-293 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-293 Summary: Seperating InterBase and Firebird dialects Type: Improvement Status: Assigned Priority: Major Project: Hibernate2 Components: core Assignee: Max Rydahl Andersen Reporter: Reha CENANI Created: Tue, 26 Aug 2003 6:46 AM Updated: Sat, 30 Aug 2003 5:36 PM Description: At the begining, opensource Firebird (or FirebirdSQL) was based on the same source code of commercial InterBase. But during past three years, lots of improvements are done to the Firebird. Recent versions of these DBMSs have different features and statement syntaxes. For example, their select offset/limit statement syntaxes are not compatible. Hibernate's recent InterbaseDialect select limit/offset feature is based on the Firebird's select statement syntax. So, in order to prevent incompabilities and confussion, in addition to the InterbaseDialect, adding a new FirebirdDialect and seperating Firebird and InterBase features will be very helpfull. --------------------------------------------------------------------- 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-08-30 22:36:27
|
Message: The following issue has been re-assigned. Assignee: Max Rydahl Andersen (mailto:xa...@xa...) Assigner: Gavin King (mailto:ga...@in...) Date: Sat, 30 Aug 2003 5:36 PM Comment: Reassigning to Max --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-297 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-297 Summary: Named Parameters not recognized in 'order by' section of Query Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.1 2.0.2 2.1 beta 1 2.1 beta 2 Assignee: Max Rydahl Andersen Reporter: Roberto S. Tyley Created: Thu, 28 Aug 2003 8:39 AM Updated: Sat, 30 Aug 2003 5:36 PM Environment: java.version=1.4.2 os.name=Windows 2000 Mckoi DB 1.0.2 Description: The following query using named parameters fails: Query q=session.createQuery("from Location loc where (loc.lonLat.UnitX between :minX and :maxX) order by ABS( loc.lonLat.UnitX - :centX )"); q.setDouble("minX", x - r); q.setDouble("maxX", x + r); q.setDouble("centX", x); Iterator locs = q.iterate(); // Fails with QueryException The final bit with 'centX' causes the problem, as the following query, with the 'centX' removed, succeeds: Query q=session.createQuery("from Location loc where (loc.lonLat.UnitX between :minX and :maxX) order by ABS( loc.lonLat.UnitX )"); q.setDouble("minX", x - r); q.setDouble("maxX", x + r); Iterator locs = q.iterate(); // Succeeds Also, using JDBC-style un-named parameters works: Query q=session.createQuery("from Location loc where (loc.lonLat.UnitX between ? and ?) order by ABS( loc.lonLat.UnitX - ? )"); q.setDouble(0, x - r); q.setDouble(1, x + r); q.setDouble(2, x); Iterator locs = q.iterate(); // Succeeds Both of these two succeeding queries bring back all the results I would expect, with the correct ordering - so none of the function-calls or presence of a parameter in the order-by clause should be illegal. The full stack trace is: net.sf.hibernate.QueryException: Named parameter does not appear in Query: centX [from com.thisbedisonfire.madgag.persistence.Location loc where (loc.lonLat.UnitX between :minX and :maxX) order by ABS( loc.lonLat.UnitX - :centX )] at net.sf.hibernate.hql.QueryTranslator.getNamedParameterLocs(QueryTranslator.java:437) at net.sf.hibernate.hql.QueryTranslator.bindNamedParameters(QueryTranslator.java:817) at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:575) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:832) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1436) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:29) at com.thisbedisonfire.madgag.Main.main(Main.java:105) So, something's going wrong with binding of named parameters... Hope you can help! Roberto S. Tyley --------------------------------------------------------------------- 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-08-30 22:30:27
|
The following comment has been added to this issue: Author: Gavin King Created: Sat, 30 Aug 2003 5:29 PM Body: Thanks! :) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-300 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-300 Summary: select new Foo(...) does not work (was ok in 2.0.1) Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: David Channon Reporter: Thilo Jahke Created: Fri, 29 Aug 2003 8:28 AM Updated: Fri, 29 Aug 2003 2:01 PM Description: The simple HQL Query select new Foo(i.name, a.street, ...) from person i left outer join address a ... did work fine in Hibernate 2.0.1 but not in the newer versions. I get the error net.sf.hibernate.QueryException: undefined alias: i Thilo --------------------------------------------------------------------- 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-08-30 05:22:27
|
The following comment has been added to this issue: Author: David Channon Created: Sat, 30 Aug 2003 12:21 AM Body: It is possible it is a side affect. I will check it out. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-300 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-300 Summary: select new Foo(...) does not work (was ok in 2.0.1) Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: David Channon Reporter: Thilo Jahke Created: Fri, 29 Aug 2003 8:28 AM Updated: Fri, 29 Aug 2003 2:01 PM Description: The simple HQL Query select new Foo(i.name, a.street, ...) from person i left outer join address a ... did work fine in Hibernate 2.0.1 but not in the newer versions. I get the error net.sf.hibernate.QueryException: undefined alias: i Thilo --------------------------------------------------------------------- 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-08-29 19:02:28
|
Message: The following issue has been re-assigned. Assignee: David Channon (mailto:dch...@bi...) Assigner: Gavin King (mailto:ga...@in...) Date: Fri, 29 Aug 2003 2:01 PM Comment: This is why we do betas ;) David, Its possible that this is a side effect of your changes to SelectParser ... at least you know the code, so would you take a look if you get a chance please. TIA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-300 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-300 Summary: select new Foo(...) does not work (was ok in 2.0.1) Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: David Channon Reporter: Thilo Jahke Created: Fri, 29 Aug 2003 8:28 AM Updated: Fri, 29 Aug 2003 2:01 PM Description: The simple HQL Query select new Foo(i.name, a.street, ...) from person i left outer join address a ... did work fine in Hibernate 2.0.1 but not in the newer versions. I get the error net.sf.hibernate.QueryException: undefined alias: i Thilo --------------------------------------------------------------------- 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-08-29 16:27:28
|
The following issue has been updated: Updater: Chris Hane (mailto:hib...@it...) Date: Fri, 29 Aug 2003 11:27 AM Comment: Test case for patch Changes: Attachment changed to SchemaTest.java --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-176&page=history --------------------------------------------------------------------- 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: Assigned Priority: Trivial Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Max Rydahl Andersen Reporter: Chris Hane Created: Thu, 10 Jul 2003 3:02 PM Updated: Fri, 29 Aug 2003 11:27 AM 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-08-29 13:29:28
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-300 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-300 Summary: select new Foo(...) does not work (was ok in 2.0.1) Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: Reporter: Thilo Jahke Created: Fri, 29 Aug 2003 8:28 AM Updated: Fri, 29 Aug 2003 8:28 AM Description: The simple HQL Query select new Foo(i.name, a.street, ...) from person i left outer join address a ... did work fine in Hibernate 2.0.1 but not in the newer versions. I get the error net.sf.hibernate.QueryException: undefined alias: i Thilo --------------------------------------------------------------------- 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-08-29 12:14:29
|
The following issue has been updated: Updater: Roberto S. Tyley (mailto:Rob...@re...) Date: Fri, 29 Aug 2003 7:13 AM Comment: I've attached a patch to correct OrderByParser, and updated FooBarTest.testNamedParams() to make a test for named parameters in the Order By clause. I hope the patch is in the correct format - I'm currently in a windows-only environment, so I used the excellent win32 port of the GNU diff tool provided by http://unxutils.sourceforge.net/ . If there's a problem with the patch, please let me know and I'll re-diff it. Changes: Attachment changed to HB-297-Patch.txt --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-297&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-297 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-297 Summary: Named Parameters not recognized in 'order by' section of Query Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.1 2.0.2 2.1 beta 1 2.1 beta 2 Assignee: Gavin King Reporter: Roberto S. Tyley Created: Thu, 28 Aug 2003 8:39 AM Updated: Fri, 29 Aug 2003 7:13 AM Environment: java.version=1.4.2 os.name=Windows 2000 Mckoi DB 1.0.2 Description: The following query using named parameters fails: Query q=session.createQuery("from Location loc where (loc.lonLat.UnitX between :minX and :maxX) order by ABS( loc.lonLat.UnitX - :centX )"); q.setDouble("minX", x - r); q.setDouble("maxX", x + r); q.setDouble("centX", x); Iterator locs = q.iterate(); // Fails with QueryException The final bit with 'centX' causes the problem, as the following query, with the 'centX' removed, succeeds: Query q=session.createQuery("from Location loc where (loc.lonLat.UnitX between :minX and :maxX) order by ABS( loc.lonLat.UnitX )"); q.setDouble("minX", x - r); q.setDouble("maxX", x + r); Iterator locs = q.iterate(); // Succeeds Also, using JDBC-style un-named parameters works: Query q=session.createQuery("from Location loc where (loc.lonLat.UnitX between ? and ?) order by ABS( loc.lonLat.UnitX - ? )"); q.setDouble(0, x - r); q.setDouble(1, x + r); q.setDouble(2, x); Iterator locs = q.iterate(); // Succeeds Both of these two succeeding queries bring back all the results I would expect, with the correct ordering - so none of the function-calls or presence of a parameter in the order-by clause should be illegal. The full stack trace is: net.sf.hibernate.QueryException: Named parameter does not appear in Query: centX [from com.thisbedisonfire.madgag.persistence.Location loc where (loc.lonLat.UnitX between :minX and :maxX) order by ABS( loc.lonLat.UnitX - :centX )] at net.sf.hibernate.hql.QueryTranslator.getNamedParameterLocs(QueryTranslator.java:437) at net.sf.hibernate.hql.QueryTranslator.bindNamedParameters(QueryTranslator.java:817) at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:575) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:832) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1436) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:29) at com.thisbedisonfire.madgag.Main.main(Main.java:105) So, something's going wrong with binding of named parameters... Hope you can help! Roberto S. Tyley --------------------------------------------------------------------- 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-08-29 10:33:28
|
Message: The following issue has been closed. Resolver: Max Rydahl Andersen Date: Fri, 29 Aug 2003 5:32 AM this is alreday implemented in cvs --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-299 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-299 Summary: Reuse of primary key in one-to-one realtion with subclasses Type: Bug Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 Versions: 2.0rc2 2.1 2.0 final 2.0.1 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: Reporter: Johan Granlund Created: Fri, 29 Aug 2003 4:50 AM Updated: Fri, 29 Aug 2003 5:32 AM Environment: Doesn't matter Description: In a flight planning system. I got three entities, Staion, Leg and Movement. A Leg is a combination of a Departure and a Arrival. Departure and Arrival are subclasses of Movement. Movement has a relation to Station and holds a time. Leg has one one-to-one relation with Arrival and one one-to-one relation with Departure. Since hibernate force you to reuse the primary key in one-to-one relations tou can't setup above since Departue and Arrival shares the same table. This is just one example when reuse of primary keys is annoying even worse is when you use composite primary keys. --------------------------------------------------------------------- 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-08-29 09:50:27
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-299 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-299 Summary: Reuse of primary key in one-to-one realtion with subclasses Type: Bug Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0rc2 2.1 2.0 final 2.0.1 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: Reporter: Johan Granlund Created: Fri, 29 Aug 2003 4:50 AM Updated: Fri, 29 Aug 2003 4:50 AM Environment: Doesn't matter Description: In a flight planning system. I got three entities, Staion, Leg and Movement. A Leg is a combination of a Departure and a Arrival. Departure and Arrival are subclasses of Movement. Movement has a relation to Station and holds a time. Leg has one one-to-one relation with Arrival and one one-to-one relation with Departure. Since hibernate force you to reuse the primary key in one-to-one relations tou can't setup above since Departue and Arrival shares the same table. This is just one example when reuse of primary keys is annoying even worse is when you use composite primary keys. --------------------------------------------------------------------- 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 |