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-10-25 08:51:00
|
The following comment has been added to this issue: Author: Gavin King Created: Sat, 25 Oct 2003 3:46 AM Body: Thanks, now using the new version :) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-47 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-47 Summary: Clustered Read/Write Caching Type: Patch Status: Closed Priority: Critical Resolution: FIXED Project: Hibernate2 Fix Fors: 2.1 beta 5 Assignee: Gavin King Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:30 AM Updated: Wed, 22 Oct 2003 3:23 AM Description: Clustered Read/Write Caching This patch adds the ability to do read-write caching in a clustered environment. This is accomplished by way of the SwarmCache caching engine. It in turn uses Javagroups to implement efficient, multicast-based cache communication. You can read a detailed description of SwarmCache at http://swarmcache.sf.net. Included in the patch is a readme that explains how it works and how to apply it. John Watkinson http://sourceforge.net/tracker/index.php?func=detail&aid=722039&group_id=40712&atid=428710 --------------------------------------------------------------------- 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-10-25 06:59:23
|
The following comment has been added to this issue: Author: John Watkinson Created: Sat, 25 Oct 2003 1:51 AM Body: Hi, I've released a new version of SwarmCache that updates JavaGroups support to the latest (JGroups 2.2). It also fixes a few bugs. The new release is RC2. I notice that there is already a file here called "SwarmCache 1.0 RC2", that must have been a name that the uploader gave to it. However, what is currently available from http://swarmcache.sf.net is newer. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-47 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-47 Summary: Clustered Read/Write Caching Type: Patch Status: Closed Priority: Critical Resolution: FIXED Project: Hibernate2 Fix Fors: 2.1 beta 5 Assignee: Gavin King Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:30 AM Updated: Wed, 22 Oct 2003 3:23 AM Description: Clustered Read/Write Caching This patch adds the ability to do read-write caching in a clustered environment. This is accomplished by way of the SwarmCache caching engine. It in turn uses Javagroups to implement efficient, multicast-based cache communication. You can read a detailed description of SwarmCache at http://swarmcache.sf.net. Included in the patch is a readme that explains how it works and how to apply it. John Watkinson http://sourceforge.net/tracker/index.php?func=detail&aid=722039&group_id=40712&atid=428710 --------------------------------------------------------------------- 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-10-25 05:55:29
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@in...) Assigner: Gavin King (mailto:ga...@in...) Date: Sat, 25 Oct 2003 12:46 AM Comment: Waiting to see if you will pull up the common code... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-380 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-380 Summary: Use ResultSet.getGeneratedKeys() when supported by JDBC driver Type: Improvement Status: Assigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: David Morris Created: Sat, 4 Oct 2003 1:02 AM Updated: Sat, 25 Oct 2003 12:46 AM Environment: JDBC 3.0 Drivers with 1.4 JDKs. MySql and DB2 both have JDBC drivers that support get generated keys. Description: Retrieve ResultSet of natively generated keys after inserting records into databases that provide this support. Performance is genrally better with this technique. The code change should be backward compatable with 1.3 JREs and older JDBC drivers. --------------------------------------------------------------------- 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-10-25 05:15:27
|
The following comment has been added to this issue: Author: David Morris Created: Sat, 25 Oct 2003 12:09 AM Body: Max, I ran my unit tests again with the patch installed and it looks good. Thanks for fixing this so quickly. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-407 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-407 Summary: Composite keys do not work with native createSQLQuery Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Fix Fors: 2.1 beta 5 Versions: 2.1 beta 4 2.1 beta 5 Assignee: Max Rydahl Andersen Reporter: David Morris Created: Thu, 16 Oct 2003 12:19 PM Updated: Tue, 21 Oct 2003 2:02 PM Description: Composite key columns are not found when replacing bracketed names. See thread http://forum.hibernate.org/viewtopic.php?t=924785 for more details. --------------------------------------------------------------------- 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-10-25 03:30:50
|
Message: The following issue has been closed. Resolver: David Channon Date: Fri, 24 Oct 2003 10:24 PM This looks like the experimental version of Middlgen plugin. It is broken and will not generate valid hibernate hbm files. Please download the pre-built versions from Sourceforge hibernate downloads. The CVS Head version of Middlegen is the experimental version. The latest is in a refactoring branch for v3.x. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-410 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-410 Summary: unable to use hbm2java with middlegen . I have a generator-class for an id but it seems to complain. Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: David Channon Reporter: sudhir srinivasan Created: Sun, 19 Oct 2003 9:36 PM Updated: Fri, 24 Oct 2003 10:24 PM Environment: windows, jdk1.4.1 Description: I am trying to use hbm2java with middlegen generated hbm.xml files This is my build file task foor hgm2java. <target name="hbm2java" depends="middlegen" description="Generate .java from .hbm files."> <echo>running a search</echo> <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="hbm2java.class.path" > <arg value="--output=${build.classes.dir}"/> <arg value="--config=${basedir}/hbm2java.xml"/> <arg value="${build.dir}/gen-src/airline/hibernate/Channel.hbm.xml"/> </java> </target> Here is the file generated by middlegen . <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <!-- Created by Middlegen Hibernate plugin http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ --> <class name="airline.hibernate.Channel" table="channels" > <!-- simple properties --> <id generator-class="assigned" name="channelId" type="int" column="channel_id" not-null="true" length="3" > <property name="description" type="java.lang.String" column="description" length="255" > <property name="hits" type="int" column="hits" length="1" > <property name="lastUpdated" type="java.sql.Timestamp" column="last_updated" length="19" > <property name="site" type="java.lang.String" column="site" length="255" > <property name="creator" type="java.lang.String" column="creator" length="255" > <property name="publisher" type="java.lang.String" column="publisher" length="255" > <!-- associations --> </class> </hibernate-mapping> here is error [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "generator-class" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(68) [java] org.xml.sax.SAXParseException: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] org.jdom.JDOMException: Error on line 68 of document file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) --------------------------------------------------------------------- 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-10-24 21:15:05
|
Message: The following issue has been reopened. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-360 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-360 Summary: WebLogic DataSource doesn't permit conn.getWarnings after commit Type: Patch Status: Reopened Priority: Major Project: Hibernate2 Components: core Fix Fors: 2.1 beta 4 Versions: 2.0.2 Assignee: Reporter: John Kristian Created: Wed, 24 Sep 2003 1:49 PM Updated: Fri, 24 Oct 2003 3:16 PM Environment: WebLogic 7, Windows 2000, Microsoft SQL Server Description: SessionFactoryImpl.closeConnection fails to close the JDBC conection, because an exception propagates from conn.getWarnings, because the connection is already closed (as a side-effect of commiting the JTA transaction, I suppose). This patch solves the problem: ==== src/net/sf/hibernate/impl/SessionFactoryImpl.java ==== @@ -403,6 +403,11 @@ try { JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { connections.closeConnection(conn); } catch (SQLException sqle) { --------------------------------------------------------------------- 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-10-24 20:22:00
|
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-360 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-360 Summary: WebLogic DataSource doesn't permit conn.getWarnings after commit Type: Patch Status: Assigned Priority: Major Project: Hibernate2 Components: core Fix Fors: 2.1 beta 4 Versions: 2.0.2 Assignee: Gavin King Reporter: John Kristian Created: Wed, 24 Sep 2003 1:49 PM Updated: Fri, 24 Oct 2003 3:16 PM Environment: WebLogic 7, Windows 2000, Microsoft SQL Server Description: SessionFactoryImpl.closeConnection fails to close the JDBC conection, because an exception propagates from conn.getWarnings, because the connection is already closed (as a side-effect of commiting the JTA transaction, I suppose). This patch solves the problem: ==== src/net/sf/hibernate/impl/SessionFactoryImpl.java ==== @@ -403,6 +403,11 @@ try { JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { connections.closeConnection(conn); } catch (SQLException sqle) { --------------------------------------------------------------------- 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-10-24 18:12:24
|
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-414 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-414 Summary: Informix dialect creates syntax errors in IDS 9.4 Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Versions: 2.0.2 Assignee: Max Rydahl Andersen Reporter: Finn McCann Created: Tue, 21 Oct 2003 11:01 AM Updated: Fri, 24 Oct 2003 11:03 AM Environment: Hibernate2 on JDK1.4 on Win2000, talking via Informix JDBC 2.21.JC5 driver to Informix IDS 9.4 on another Windows 2000 box. Description: Having tested Informix dialect in Hibernate2 against Informix IDS v9.4, we found a couple of issues: 1. Serial ids: <id name="id" column="ID" length="32" unsaved-value="null"> <generator class="uuid.hex"/> </id> creates a data type: INT8 SERIAL instead of: SERIAL8 The "INT8 SERIAL" causes a syntax error in IDS 9.4. 2. Foreign Key constraint names: <set name="upliftRates" lazy="true" cascade="all" order-by="EFFECTIVE_DATE desc"> <key column="NETWORK_ID" length="32"/> <one-to-many class="com.capetechnologies.multinet.domain.UpliftRate"/> </set> creates this ALTER TABLE statement: alter table MULTINET_TAX_RATES add constraint FKE1700D046924EC foreign key (NETWORK_ID) references MULTINET_NETWORK instead of: alter table MULTINET_TAX_RATES add constraint foreign key (NETWORK_ID) references MULTINET_NETWORK constraint FKE1700D046924EC Having "CONSTRAINT <constraint name>" within the statement instead of at the end causes a syntax error. This also applies to adding UNIQUE CONSTRAINTs. --------------------------------------------------------------------- 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-10-24 13:00:24
|
The following comment has been added to this issue: Author: Finn McCann Created: Fri, 24 Oct 2003 4:57 AM Body: In net.sf.hibernate.mapping.Table, you need to modify the following method: public String sqlCreateString(Dialect dialect, Mapping p) throws HibernateException { You will need to change the following: buf.append( col.getQuotedName(dialect) ) .append(' ') .append( col.getSqlType(dialect, p) ); if ( identityColumn && col.getQuotedName(dialect).equals(pkname) ) { buf.append(' ').append( dialect.getIdentityColumnString() ); } To something like: buf.append( col.getQuotedName(dialect) ) .append(' '); // to support dialects that have their own identity data type if ( !identityColumn || dialect.hasDataTypeInIdentityColumn() ) { buf.append( col.getSqlType(dialect, p) ); } if ( identityColumn && col.getQuotedName(dialect).equals(pkname) ) { buf.append(' ').append( dialect.getIdentityColumnString() ); } and the net.sf.hibernate.dialect.Dialect should have a new method: /** * Does this dialect have an Identity clause added to the data type or a * completely seperate identity data type? * @return boolean */ public boolean hasDataTypeInIdentityColumn() { return true; } This means you can create a net.sf.hibernate.dialect.Informix9Dialect package net.sf.hibernate.dialect; /** * Informix9 dialect. This class is extends the Informix 7 dialect * <br> * Seems to work with Informix Dynamic Server Version 9.4, * Informix JDBC driver version 2.21JC5. * @author Finn McCann */ public class Informix9Dialect extends InformixDialect { public Informix9Dialect() { super(); } /** * @see net.sf.hibernate.dialect.Dialect#getIdentityColumnString() */ public String getIdentityColumnString() throws MappingException { return "SERIAL8 NOT NULL"; } /** * @see net.sf.hibernate.dialect.Dialect#hasDataTypeInIdentityColumn() * Informix9 has it's own SERIAL8 datatype. * @return boolean */ public boolean hasDataTypeInIdentityColumn() { return false; } /** * The syntax used to add a foreign key constraint to a table. * Informix constraint name must be at the end. * @return String */ public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey) { return new StringBuffer(30) .append(" add constraint ") .append(" foreign key (") .append( StringHelper.join(StringHelper.COMMA_SPACE, foreignKey) ) .append(") references ") .append(referencedTable) .append(" constraint ") .append(constraintName) .toString(); } /** * The syntax used to add a primary key constraint to a table. * Informix constraint name must be at the end. * @return String */ public String getAddPrimaryKeyConstraintString(String constraintName) { return " add constraint primary key constraint " + constraintName + " "; } } --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-414 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-414 Summary: Informix dialect creates syntax errors in IDS 9.4 Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.0.2 Assignee: Reporter: Finn McCann Created: Tue, 21 Oct 2003 11:01 AM Updated: Tue, 21 Oct 2003 11:01 AM Environment: Hibernate2 on JDK1.4 on Win2000, talking via Informix JDBC 2.21.JC5 driver to Informix IDS 9.4 on another Windows 2000 box. Description: Having tested Informix dialect in Hibernate2 against Informix IDS v9.4, we found a couple of issues: 1. Serial ids: <id name="id" column="ID" length="32" unsaved-value="null"> <generator class="uuid.hex"/> </id> creates a data type: INT8 SERIAL instead of: SERIAL8 The "INT8 SERIAL" causes a syntax error in IDS 9.4. 2. Foreign Key constraint names: <set name="upliftRates" lazy="true" cascade="all" order-by="EFFECTIVE_DATE desc"> <key column="NETWORK_ID" length="32"/> <one-to-many class="com.capetechnologies.multinet.domain.UpliftRate"/> </set> creates this ALTER TABLE statement: alter table MULTINET_TAX_RATES add constraint FKE1700D046924EC foreign key (NETWORK_ID) references MULTINET_NETWORK instead of: alter table MULTINET_TAX_RATES add constraint foreign key (NETWORK_ID) references MULTINET_NETWORK constraint FKE1700D046924EC Having "CONSTRAINT <constraint name>" within the statement instead of at the end causes a syntax error. This also applies to adding UNIQUE CONSTRAINTs. --------------------------------------------------------------------- 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-10-24 12:32:47
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 23 Oct 2003 1:45 PM Naah, this is not really doable. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-422 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-422 Summary: any.class and binding HQL parameters Type: Improvement Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Reporter: Matjaz Smolej Created: Thu, 23 Oct 2003 8:33 AM Updated: Thu, 23 Oct 2003 1:45 PM Description: I have a persistent class with a property mapped with "any". Excerpt from the mapping file: --- <any name="item" id-type="long" meta-type="eg.MyUserType"> <column name="Type"/> <column name="ID"/> </any> --- Consider the following HQL where log.item is a property mapped with "any": --- from eg.AuditLog log where log.item.class = :itemClass --- When binding query parameter "itemClass" using method: Query#setParameter(String name, Object value) one cannot use the preferred Class instance as the value parameter, but needs to use it's mapped value produced by any's meta-type. If one wants to use the Class instance as a parameter, he must use the method: Query#setParameter(String name, Object value, Type type) where type must be the same as specified with any's meta-type attribute (eg. Hibernate.custom(eg.MyUserType.class)). I think this is redundant since Hibernate already knows the "meta-type" specified in "any" mapping. Hibernate could use this meta-type as a default type when binding query parameters using method Query#setParameter(String name, Object value). --------------------------------------------------------------------- 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: David Duffy Created: Wed, 22 Oct 2003 4:59 PM Body: Sorry, I should mention that the test case main method is in com/fgl/ina/tests/HibernateTest. Also, the "useless-looking" calls to saveOrUpdate are two fold; 1) they serve to save the convoluted object hierarchy in stages because I still don't understand how to do things properly and I have some really screwy code still kicking around from when I understood even less, and 2) they serve to mimic the MVC stages that happen in my app where I am having the issue. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-420 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-420 Summary: Adding a new instance to a persistent bag and calling saveOrUpdate adds a duplicate instance to the bag but not the DB. Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 3 2.1 beta 4 Assignee: Reporter: David Duffy Created: Wed, 22 Oct 2003 3:27 PM Updated: Wed, 22 Oct 2003 4:52 PM Environment: JDK1.4.2, Windows 2003 Server; JDK1.4.2, Windows 2000; JDK1.3.1 Windows 2000 Description: When a new (transient) instance of a persisted child is created and added to the "bag" of children on the parent and then the parent is re-persisted via Session.saveOrUpdate() a second instance of the child will be added to the "bag" but not to the database. However, calling the .size() method on the "bag" before calling saveOrUpdate() will cause the problem to disappear. A unit test class that demonstrates this is as follows: package com.fgl.ina.tests; import junit.framework.TestCase; import net.sf.hibernate.cfg.Configuration; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Session; import net.sf.hibernate.LockMode; import java.net.URL; import java.util.Properties; import java.util.ArrayList; //import java.util.Map; import java.util.Iterator; import java.io.BufferedInputStream; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.Log; import com.fgl.ina.stylecreation.Product; //import com.fgl.ina.stylecreation.details.ProductDescription; import com.fgl.ina.stylecreation.barcodes.ProductBarcode; import com.fgl.ina.stylecreation.lookups.BarcodeType; import com.fgl.ina.stylecreation.coloursize.ProductColourSizeHelper; import com.fgl.ina.stylecreation.coloursize.ProductColourAndSize; import com.fgl.ina.services.DataAccessService; import com.fgl.ina.mastertables.colours.Colour; import com.fgl.ina.mastertables.sizes.Size; /** * Tests Hibernate (sort of), or at least aspects that are of immediate concern at time of writing. * @author David Duffy */ public class HibernateTest extends TestCase { //TODO: make a test suite (or whatever it is) that will do the setup and teardown only once for all Hibernate tests private static final Log log = LogFactory.getLog(HibernateTest.class); private static final String TEST_CONFIG_PATH = "/com/fgl/ina/tests/hibernatetest.cfg.xml"; private static final String TEST_PROPERTIES_PATH = "/com/fgl/ina/tests/hibernatetest.properties"; private SessionFactory factory; public HibernateTest(String testName) { super(testName); } /** * Perform unit test set up before running test(s). */ protected void setUp() { Configuration configuration = null; URL configFileURL = null; try { configFileURL = Class.class.getResource(TEST_CONFIG_PATH); if (log.isDebugEnabled()) { log.debug("Initializing Hibernate from " + TEST_CONFIG_PATH + "..."); } BufferedInputStream bis = new BufferedInputStream(Class.class.getResourceAsStream(TEST_PROPERTIES_PATH)); Properties properties = new Properties(); properties.load(bis); bis.close(); configuration = (new Configuration().setProperties(properties)).configure(configFileURL); factory = configuration.buildSessionFactory(); } catch (Throwable t) { log.error("Exception while initializing Hibernate.", t); } } /** * Perform unit test tear down after running test(s). */ protected void tearDown() { try { if (factory != null) { factory.close(); } } catch (Throwable t) { log.error("Couldn't close session factory", t); } } // TODO: make setup/teardown do the supporting object creation when there is a suite that does the Hibernate config public void testAddingBarcodes() throws Exception { if (factory == null) { fail("SessionFactory == null"); } else { Session session = factory.openSession(); try { // create a new product, remove its descriptions temporarily and save it without them Product product = new Product(0); product.getDetails().setVendorNumber(1); product.getDetails().setVpn("unittestvpn"); // Map temp = product.getProductDescriptions(); product.setProductDescriptions(null); DataAccessService.saveOrUpdate(session, product); // start building up the colours and sizes... try { // get a valid colour Colour colour = (Colour)DataAccessService.get(session, Colour.class).get(0); // get a valid size Size size = (Size)DataAccessService.get(session, Size.class).get(0); // add the valid colour and size (references) to the product and save the product (again). product.getColours().add(colour); product.getSizes().add(size); DataAccessService.saveOrUpdate(session, product); // create a Collection for colour/size combinations and run the helper method to create the records // for the existing colours and sizes on the product product.setColourSizes(new ArrayList()); ProductColourSizeHelper.createColourSizesForColour(session, product, colour.getColourID()); // save the product now that it has colour and size combinations (in this test there is only one). DataAccessService.saveOrUpdate(session, product); // use this session to load the barcode barcodeType and then close the session. BarcodeType barcodeType = (BarcodeType)DataAccessService.get(session, BarcodeType.class, new Integer(1)); session.flush(); // redundant... session.close(); // open a new session and reload the product so that null Collections will get proxies... session = factory.openSession(); product = (Product)DataAccessService.get(session, Product.class, new Integer(product.getProductID())); session.close(); // get a new session so that the product instance spans multiple sessions just like in the real // scenario being debugged... session = factory.openSession(); // lock the product to the new session to reassociate it with the new session session.lock(product, LockMode.UPGRADE); // grab the colour and size combination, create a new barcode, and add it to the colour/size. ProductColourAndSize colourSize = (ProductColourAndSize)product.getColourSizes().iterator().next(); ProductBarcode barcode = new ProductBarcode("498765123452", colourSize, barcodeType); colourSize.addBarcode(barcode); // the "magic" line that makes all the difference... // colourSize.getBarcodes().size(); // save the product again... DataAccessService.saveOrUpdate(session, product); // test whether there is only one barcode in the collection (which there should be) assertTrue("barcodes.size() should == 1 but was actually " + colourSize.getBarcodes().size(), colourSize.getBarcodes().size() == 1); } catch (Exception e) { log.fatal("?", e); fail("exception"); } finally { if (product != null) { try { Iterator colourSizeIterator = product.getColourSizes().iterator(); while (colourSizeIterator.hasNext()) { ProductColourAndSize deleteMe = (ProductColourAndSize)colourSizeIterator.next(); colourSizeIterator.remove(); DataAccessService.delete(session, deleteMe); } DataAccessService.saveOrUpdate(session, product); } catch (Exception e) { log.warn("couldn't remove colours/sizes and resave product", e); } try { DataAccessService.delete(session, product); } catch (Exception e2) { log.error("cleanup failed: could not delete unittest product " + product.getProductID(), e2); } } } } catch (Exception e) { log.error("?", e); fail("exception"); } finally { if (session != null && session.isOpen()) { session.close(); } } } } } --------------------------------------------------------------------- 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-10-24 10:26:34
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@in...) Date: Thu, 23 Oct 2003 1:26 PM Changes: type changed from Bug summary changed from Criteria API and key-many-to-one --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-417&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-417 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-417 Summary: support createCriteria() for <key-many-to-one> Type: New Feature Status: Assigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Sebastien Cesbron Created: Wed, 22 Oct 2003 3:07 AM Updated: Thu, 23 Oct 2003 1:26 PM Environment: Win2k SQLServer with jTds driver Description: I have one class Bar with a primary key composed of a 'key-many-to-one' to a class Foo. I want to find a Bar instance with a Foo id so I have this criteria : Criteria criteria = session.createCriteria(Bar.class); criteria.createCriteria("foo").add(Expression.eq("id", new Integer(1))); Bar bar = (Bar) criteria.uniqueResult(); Then I have this sql statement select this.ID_FOO as ID_FOO0_, this.text as text0_ from BAR this where x0_.id=1 which fails because x0_ isn't defined. With an HQL query it works. --------------------------------------------------------------------- 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-10-24 03:53:36
|
The following comment has been added to this issue: Author: Gavin King Created: Wed, 22 Oct 2003 5:53 AM Body: What happens when you use: criteria.createCriteria("foo").add(Expression.eq("foo", new Integer(1))); --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-417 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-417 Summary: Criteria API and key-many-to-one Type: Bug Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Reporter: Sebastien Cesbron Created: Wed, 22 Oct 2003 3:07 AM Updated: Wed, 22 Oct 2003 3:08 AM Environment: Win2k SQLServer with jTds driver Description: I have one class Bar with a primary key composed of a 'key-many-to-one' to a class Foo. I want to find a Bar instance with a Foo id so I have this criteria : Criteria criteria = session.createCriteria(Bar.class); criteria.createCriteria("foo").add(Expression.eq("id", new Integer(1))); Bar bar = (Bar) criteria.uniqueResult(); Then I have this sql statement select this.ID_FOO as ID_FOO0_, this.text as text0_ from BAR this where x0_.id=1 which fails because x0_ isn't defined. With an HQL query it works. --------------------------------------------------------------------- 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: David Duffy Created: Wed, 22 Oct 2003 6:47 PM Body: As for stripped down to a few calls... there are only two calls in question: "bag".size(); and saveOrUpdate(); Without the first one the duplication occurs, with the first one some kind of re-initialization occurs which "prevents" the saveOrUpdate from adding the dupliate instance. Everything else is just setup and teardown, I'm sorry my model is complex but that's what is required of the app and that is where the problem occurs. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-420 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-420 Summary: Adding a new instance to a persistent bag and calling saveOrUpdate adds a duplicate instance to the bag but not the DB. Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 beta 3 2.1 beta 4 Assignee: Reporter: David Duffy Created: Wed, 22 Oct 2003 3:27 PM Updated: Wed, 22 Oct 2003 5:15 PM Environment: JDK1.4.2, Windows 2003 Server; JDK1.4.2, Windows 2000; JDK1.3.1 Windows 2000 Description: When a new (transient) instance of a persisted child is created and added to the "bag" of children on the parent and then the parent is re-persisted via Session.saveOrUpdate() a second instance of the child will be added to the "bag" but not to the database. However, calling the .size() method on the "bag" before calling saveOrUpdate() will cause the problem to disappear. A unit test class that demonstrates this is as follows: package com.fgl.ina.tests; import junit.framework.TestCase; import net.sf.hibernate.cfg.Configuration; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Session; import net.sf.hibernate.LockMode; import java.net.URL; import java.util.Properties; import java.util.ArrayList; //import java.util.Map; import java.util.Iterator; import java.io.BufferedInputStream; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.Log; import com.fgl.ina.stylecreation.Product; //import com.fgl.ina.stylecreation.details.ProductDescription; import com.fgl.ina.stylecreation.barcodes.ProductBarcode; import com.fgl.ina.stylecreation.lookups.BarcodeType; import com.fgl.ina.stylecreation.coloursize.ProductColourSizeHelper; import com.fgl.ina.stylecreation.coloursize.ProductColourAndSize; import com.fgl.ina.services.DataAccessService; import com.fgl.ina.mastertables.colours.Colour; import com.fgl.ina.mastertables.sizes.Size; /** * Tests Hibernate (sort of), or at least aspects that are of immediate concern at time of writing. * @author David Duffy */ public class HibernateTest extends TestCase { //TODO: make a test suite (or whatever it is) that will do the setup and teardown only once for all Hibernate tests private static final Log log = LogFactory.getLog(HibernateTest.class); private static final String TEST_CONFIG_PATH = "/com/fgl/ina/tests/hibernatetest.cfg.xml"; private static final String TEST_PROPERTIES_PATH = "/com/fgl/ina/tests/hibernatetest.properties"; private SessionFactory factory; public HibernateTest(String testName) { super(testName); } /** * Perform unit test set up before running test(s). */ protected void setUp() { Configuration configuration = null; URL configFileURL = null; try { configFileURL = Class.class.getResource(TEST_CONFIG_PATH); if (log.isDebugEnabled()) { log.debug("Initializing Hibernate from " + TEST_CONFIG_PATH + "..."); } BufferedInputStream bis = new BufferedInputStream(Class.class.getResourceAsStream(TEST_PROPERTIES_PATH)); Properties properties = new Properties(); properties.load(bis); bis.close(); configuration = (new Configuration().setProperties(properties)).configure(configFileURL); factory = configuration.buildSessionFactory(); } catch (Throwable t) { log.error("Exception while initializing Hibernate.", t); } } /** * Perform unit test tear down after running test(s). */ protected void tearDown() { try { if (factory != null) { factory.close(); } } catch (Throwable t) { log.error("Couldn't close session factory", t); } } // TODO: make setup/teardown do the supporting object creation when there is a suite that does the Hibernate config public void testAddingBarcodes() throws Exception { if (factory == null) { fail("SessionFactory == null"); } else { Session session = factory.openSession(); try { // create a new product, remove its descriptions temporarily and save it without them Product product = new Product(0); product.getDetails().setVendorNumber(1); product.getDetails().setVpn("unittestvpn"); // Map temp = product.getProductDescriptions(); product.setProductDescriptions(null); DataAccessService.saveOrUpdate(session, product); // start building up the colours and sizes... try { // get a valid colour Colour colour = (Colour)DataAccessService.get(session, Colour.class).get(0); // get a valid size Size size = (Size)DataAccessService.get(session, Size.class).get(0); // add the valid colour and size (references) to the product and save the product (again). product.getColours().add(colour); product.getSizes().add(size); DataAccessService.saveOrUpdate(session, product); // create a Collection for colour/size combinations and run the helper method to create the records // for the existing colours and sizes on the product product.setColourSizes(new ArrayList()); ProductColourSizeHelper.createColourSizesForColour(session, product, colour.getColourID()); // save the product now that it has colour and size combinations (in this test there is only one). DataAccessService.saveOrUpdate(session, product); // use this session to load the barcode barcodeType and then close the session. BarcodeType barcodeType = (BarcodeType)DataAccessService.get(session, BarcodeType.class, new Integer(1)); session.flush(); // redundant... session.close(); // open a new session and reload the product so that null Collections will get proxies... session = factory.openSession(); product = (Product)DataAccessService.get(session, Product.class, new Integer(product.getProductID())); session.close(); // get a new session so that the product instance spans multiple sessions just like in the real // scenario being debugged... session = factory.openSession(); // lock the product to the new session to reassociate it with the new session session.lock(product, LockMode.UPGRADE); // grab the colour and size combination, create a new barcode, and add it to the colour/size. ProductColourAndSize colourSize = (ProductColourAndSize)product.getColourSizes().iterator().next(); ProductBarcode barcode = new ProductBarcode("498765123452", colourSize, barcodeType); colourSize.addBarcode(barcode); // the "magic" line that makes all the difference... // colourSize.getBarcodes().size(); // save the product again... DataAccessService.saveOrUpdate(session, product); // test whether there is only one barcode in the collection (which there should be) assertTrue("barcodes.size() should == 1 but was actually " + colourSize.getBarcodes().size(), colourSize.getBarcodes().size() == 1); } catch (Exception e) { log.fatal("?", e); fail("exception"); } finally { if (product != null) { try { Iterator colourSizeIterator = product.getColourSizes().iterator(); while (colourSizeIterator.hasNext()) { ProductColourAndSize deleteMe = (ProductColourAndSize)colourSizeIterator.next(); colourSizeIterator.remove(); DataAccessService.delete(session, deleteMe); } DataAccessService.saveOrUpdate(session, product); } catch (Exception e) { log.warn("couldn't remove colours/sizes and resave product", e); } try { DataAccessService.delete(session, product); } catch (Exception e2) { log.error("cleanup failed: could not delete unittest product " + product.getProductID(), e2); } } } } catch (Exception e) { log.error("?", e); fail("exception"); } finally { if (session != null && session.isOpen()) { session.close(); } } } } } --------------------------------------------------------------------- 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-10-24 03:03:48
|
The following comment has been added to this issue: Author: Gavin King Created: Thu, 23 Oct 2003 1:25 PM Body: OK - this is a little bit harder to make work than I thought (its not so much a "bug" as a "new feature"). So I'll have a look at it when I get a chance. Unless you have a really pressing need for it, this won't be very soon.... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-417 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-417 Summary: Criteria API and key-many-to-one Type: Bug Status: Assigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Sebastien Cesbron Created: Wed, 22 Oct 2003 3:07 AM Updated: Wed, 22 Oct 2003 12:51 PM Environment: Win2k SQLServer with jTds driver Description: I have one class Bar with a primary key composed of a 'key-many-to-one' to a class Foo. I want to find a Bar instance with a Foo id so I have this criteria : Criteria criteria = session.createCriteria(Bar.class); criteria.createCriteria("foo").add(Expression.eq("id", new Integer(1))); Bar bar = (Bar) criteria.uniqueResult(); Then I have this sql statement select this.ID_FOO as ID_FOO0_, this.text as text0_ from BAR this where x0_.id=1 which fails because x0_ isn't defined. With an HQL query it works. --------------------------------------------------------------------- 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-10-23 23:35:19
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 23 Oct 2003 1:28 PM There has been no great demand for this, so won't implement. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-46 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-46 Summary: new Session.setJdbcBatchSize method Type: Patch Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Assignee: Gavin King Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:30 AM Updated: Thu, 23 Oct 2003 1:28 PM Description: new Session.setJdbcBatchSize method Sometimes it is useful to be able to explicitly set JDBC batch size for one session. For example, it is necessary to suppress batching to use ClobStringType with Oracle. Another use is to increase batch size during mass- loading data into the database. The implementation of setJdbcBatchSize provided in this patch is incomplete but I will provide full implementation if there is an interest in this patch from Hibernate developers (not that I am hiding anything, I just have to write/test some code). http://sourceforge.net/tracker/index.php?func=detail&aid=719190&group_id=40712&atid=428710 --------------------------------------------------------------------- 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-10-23 21:14:41
|
Message: The following issue has been re-assigned. Assignee: (mailto:) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-132 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-132 Summary: Order support for joined Criteria Type: Improvement Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 Assignee: Reporter: Grzegorz Mucha Created: Thu, 12 Jun 2003 3:59 AM Updated: Thu, 23 Oct 2003 3:21 PM Description: Is there a plan to add some extensions to Criteria API? Since there is now FETCH support in Criteria, a nice thing would be to allow users sorting the criteria returned not only by class properties, but the associated classes' properties as well. example: class Task { User user; ........ } Criteria crit=session.createCriteria(Task.class); crit.addOrder(Order.asc("user.lastName"); I know it can be done in java,by applying own sorters for the returned list, though I'd prefer a single step process --------------------------------------------------------------------- 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-10-23 21:07:40
|
The following comment has been added to this issue: Author: Gavin King Created: Thu, 23 Oct 2003 1:29 PM Body: six votes....it doing pretty well.... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-27 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-27 Summary: Persistent String Enum Type: Patch Status: Assigned Priority: Minor Project: Hibernate2 Assignee: Gavin King Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:15 AM Updated: Thu, 15 May 2003 4:38 AM Description: Persistent String Enum PersistentEnum type is a very userfull feature, but in the legacy data world it happens that some enumerations are stored in "char" columns instead of integer and, as far as I understood, I can map a persistent enumeration only with integer. Mapping my existing data I found several char(2) fields that would be nice to map with an enumeration. I tried to write a patch in order to manage such fields introducing a new Hibernate type PersistentStringEnumType and an interface PersistentStringEnum that one can use as the existing PersistenEnum interface. Please, find the modified classes (TypeFactory, MappingByReflection, Hibernate) and the new one (PersistentStringEnum, PersistentEnum) in the attached zip (for Hibernate 1.2) (BTW: Does someone know a simple way to make a patch against CVS?) It also contains a test case for the feature. The test sources explain how to use it. http://sourceforge.net/tracker/index.php?func=detail&aid=684810&group_id=40712&atid=428711 The lenght of the field must be declared in the mapping through the attribute in the <property> tag. I would be nice if we could set it somewhere in the class that define the PersistentStringEnum, but I can't realize if it's possible. stefano Add a Comment: --------------------------------------------------------------------- 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-10-23 19:11:11
|
Message: The following issue has been re-assigned. Assignee: (mailto:) Assigner: Gavin King (mailto:ga...@in...) Date: Thu, 23 Oct 2003 1:27 PM Comment: unassigning, 'cos I'm not working on it... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-417 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-417 Summary: support createCriteria() for <key-many-to-one> Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Reporter: Sebastien Cesbron Created: Wed, 22 Oct 2003 3:07 AM Updated: Thu, 23 Oct 2003 1:27 PM Environment: Win2k SQLServer with jTds driver Description: I have one class Bar with a primary key composed of a 'key-many-to-one' to a class Foo. I want to find a Bar instance with a Foo id so I have this criteria : Criteria criteria = session.createCriteria(Bar.class); criteria.createCriteria("foo").add(Expression.eq("id", new Integer(1))); Bar bar = (Bar) criteria.uniqueResult(); Then I have this sql statement select this.ID_FOO as ID_FOO0_, this.text as text0_ from BAR this where x0_.id=1 which fails because x0_ isn't defined. With an HQL query it works. --------------------------------------------------------------------- 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-10-23 16:11:11
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-422 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-422 Summary: any.class and binding HQL parameters Type: Improvement Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Reporter: Matjaz Smolej Created: Thu, 23 Oct 2003 8:33 AM Updated: Thu, 23 Oct 2003 8:33 AM Description: I have a persistent class with a property mapped with "any". Excerpt from the mapping file: --- <any name="item" id-type="long" meta-type="eg.MyUserType"> <column name="Type"/> <column name="ID"/> </any> --- Consider the following HQL where log.item is a property mapped with "any": --- from eg.AuditLog log where log.item.class = :itemClass --- When binding query parameter "itemClass" using method: Query#setParameter(String name, Object value) one cannot use the preferred Class instance as the value parameter, but needs to use it's mapped value produced by any's meta-type. If one wants to use the Class instance as a parameter, he must use the method: Query#setParameter(String name, Object value, Type type) where type must be the same as specified with any's meta-type attribute (eg. Hibernate.custom(eg.MyUserType.class)). I think this is redundant since Hibernate already knows the "meta-type" specified in "any" mapping. Hibernate could use this meta-type as a default type when binding query parameters using method Query#setParameter(String name, Object value). --------------------------------------------------------------------- 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: Thu, 23 Oct 2003 12:28 AM Body: Nevertheless, you did not isolate the problem. If you are correct, this problem must be reproduceable with 2 classes and presumably about 10-20 lines of Hibernate code. I have a very strong suspicion that if you try to strip your example down to that, you will discover the cause for yourself. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-420 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-420 Summary: Adding a new instance to a persistent bag and calling saveOrUpdate adds a duplicate instance to the bag but not the DB. Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 beta 3 2.1 beta 4 Assignee: Reporter: David Duffy Created: Wed, 22 Oct 2003 3:27 PM Updated: Wed, 22 Oct 2003 5:15 PM Environment: JDK1.4.2, Windows 2003 Server; JDK1.4.2, Windows 2000; JDK1.3.1 Windows 2000 Description: When a new (transient) instance of a persisted child is created and added to the "bag" of children on the parent and then the parent is re-persisted via Session.saveOrUpdate() a second instance of the child will be added to the "bag" but not to the database. However, calling the .size() method on the "bag" before calling saveOrUpdate() will cause the problem to disappear. A unit test class that demonstrates this is as follows: package com.fgl.ina.tests; import junit.framework.TestCase; import net.sf.hibernate.cfg.Configuration; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Session; import net.sf.hibernate.LockMode; import java.net.URL; import java.util.Properties; import java.util.ArrayList; //import java.util.Map; import java.util.Iterator; import java.io.BufferedInputStream; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.Log; import com.fgl.ina.stylecreation.Product; //import com.fgl.ina.stylecreation.details.ProductDescription; import com.fgl.ina.stylecreation.barcodes.ProductBarcode; import com.fgl.ina.stylecreation.lookups.BarcodeType; import com.fgl.ina.stylecreation.coloursize.ProductColourSizeHelper; import com.fgl.ina.stylecreation.coloursize.ProductColourAndSize; import com.fgl.ina.services.DataAccessService; import com.fgl.ina.mastertables.colours.Colour; import com.fgl.ina.mastertables.sizes.Size; /** * Tests Hibernate (sort of), or at least aspects that are of immediate concern at time of writing. * @author David Duffy */ public class HibernateTest extends TestCase { //TODO: make a test suite (or whatever it is) that will do the setup and teardown only once for all Hibernate tests private static final Log log = LogFactory.getLog(HibernateTest.class); private static final String TEST_CONFIG_PATH = "/com/fgl/ina/tests/hibernatetest.cfg.xml"; private static final String TEST_PROPERTIES_PATH = "/com/fgl/ina/tests/hibernatetest.properties"; private SessionFactory factory; public HibernateTest(String testName) { super(testName); } /** * Perform unit test set up before running test(s). */ protected void setUp() { Configuration configuration = null; URL configFileURL = null; try { configFileURL = Class.class.getResource(TEST_CONFIG_PATH); if (log.isDebugEnabled()) { log.debug("Initializing Hibernate from " + TEST_CONFIG_PATH + "..."); } BufferedInputStream bis = new BufferedInputStream(Class.class.getResourceAsStream(TEST_PROPERTIES_PATH)); Properties properties = new Properties(); properties.load(bis); bis.close(); configuration = (new Configuration().setProperties(properties)).configure(configFileURL); factory = configuration.buildSessionFactory(); } catch (Throwable t) { log.error("Exception while initializing Hibernate.", t); } } /** * Perform unit test tear down after running test(s). */ protected void tearDown() { try { if (factory != null) { factory.close(); } } catch (Throwable t) { log.error("Couldn't close session factory", t); } } // TODO: make setup/teardown do the supporting object creation when there is a suite that does the Hibernate config public void testAddingBarcodes() throws Exception { if (factory == null) { fail("SessionFactory == null"); } else { Session session = factory.openSession(); try { // create a new product, remove its descriptions temporarily and save it without them Product product = new Product(0); product.getDetails().setVendorNumber(1); product.getDetails().setVpn("unittestvpn"); // Map temp = product.getProductDescriptions(); product.setProductDescriptions(null); DataAccessService.saveOrUpdate(session, product); // start building up the colours and sizes... try { // get a valid colour Colour colour = (Colour)DataAccessService.get(session, Colour.class).get(0); // get a valid size Size size = (Size)DataAccessService.get(session, Size.class).get(0); // add the valid colour and size (references) to the product and save the product (again). product.getColours().add(colour); product.getSizes().add(size); DataAccessService.saveOrUpdate(session, product); // create a Collection for colour/size combinations and run the helper method to create the records // for the existing colours and sizes on the product product.setColourSizes(new ArrayList()); ProductColourSizeHelper.createColourSizesForColour(session, product, colour.getColourID()); // save the product now that it has colour and size combinations (in this test there is only one). DataAccessService.saveOrUpdate(session, product); // use this session to load the barcode barcodeType and then close the session. BarcodeType barcodeType = (BarcodeType)DataAccessService.get(session, BarcodeType.class, new Integer(1)); session.flush(); // redundant... session.close(); // open a new session and reload the product so that null Collections will get proxies... session = factory.openSession(); product = (Product)DataAccessService.get(session, Product.class, new Integer(product.getProductID())); session.close(); // get a new session so that the product instance spans multiple sessions just like in the real // scenario being debugged... session = factory.openSession(); // lock the product to the new session to reassociate it with the new session session.lock(product, LockMode.UPGRADE); // grab the colour and size combination, create a new barcode, and add it to the colour/size. ProductColourAndSize colourSize = (ProductColourAndSize)product.getColourSizes().iterator().next(); ProductBarcode barcode = new ProductBarcode("498765123452", colourSize, barcodeType); colourSize.addBarcode(barcode); // the "magic" line that makes all the difference... // colourSize.getBarcodes().size(); // save the product again... DataAccessService.saveOrUpdate(session, product); // test whether there is only one barcode in the collection (which there should be) assertTrue("barcodes.size() should == 1 but was actually " + colourSize.getBarcodes().size(), colourSize.getBarcodes().size() == 1); } catch (Exception e) { log.fatal("?", e); fail("exception"); } finally { if (product != null) { try { Iterator colourSizeIterator = product.getColourSizes().iterator(); while (colourSizeIterator.hasNext()) { ProductColourAndSize deleteMe = (ProductColourAndSize)colourSizeIterator.next(); colourSizeIterator.remove(); DataAccessService.delete(session, deleteMe); } DataAccessService.saveOrUpdate(session, product); } catch (Exception e) { log.warn("couldn't remove colours/sizes and resave product", e); } try { DataAccessService.delete(session, product); } catch (Exception e2) { log.error("cleanup failed: could not delete unittest product " + product.getProductID(), e2); } } } } catch (Exception e) { log.error("?", e); fail("exception"); } finally { if (session != null && session.isOpen()) { session.close(); } } } } } --------------------------------------------------------------------- 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-10-23 05:45:15
|
Message: The following issue has been closed. Resolver: Gavin King Date: Wed, 22 Oct 2003 7:42 PM There has been no real demand for this and it is easily handled as a user type. So lets not bloat Hibernate. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-30 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-30 Summary: SqlData type Type: Patch Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Assignee: Gavin King Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:17 AM Updated: Wed, 22 Oct 2003 7:42 PM Description: SqlData type We have some Oracle objects and need to read/write its to database. We have java classes that implements java.sql.SqlData interface but Hibernate can't map SQL object types to java (perhaps I simple don't know how to do it). I wrote SqlDataType class which can do it for me and changed TypeFactory for produces SqlDataType for classes which instantiate SqlData interface. All work nice but I can't use fields of that classes in Query. It will be nice to see it in future release. Here is my implementation of SqlDataType: -------------------------------- package net.sf.hibernate.type; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; public class SqlDataType extends PrimitiveType { protected Class persistentClass; public SqlDataType(Class persistentClass) { this.persistentClass = persistentClass; } public Object get(ResultSet rs, String name) throws SQLException { return rs.getObject(name); } public Class primitiveClass() { return persistentClass; } public Class getReturnedClass() { return persistentClass; } public void set(PreparedStatement st, Object value, int index) throws SQLException { if (value == null) st.setNull(index, sqlType()); else st.setObject(index, value); } public int sqlType() { return Types.JAVA_OBJECT; } public String getName() { return persistentClass.getName(); } public String objectToSQLString(Object value) throws Exception { return value.toString(); } } ------------ Here changes in hueristicType method of TypeFactory class else if ( SQLData.class.isAssignableFrom(typeClass) ) { type = new SqlDataType(typeClass); } With best regards. Dmitry M.Ivlev http://sourceforge.net/tracker/index.php?func=detail&aid=705454&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-10-23 02:55:17
|
The following comment has been added to this issue: Author: Sebastien Cesbron Created: Wed, 22 Oct 2003 6:06 AM Body: when I use criteria.createCriteria("foo").add(Expression.eq("foo", new Integer(1))); I have the exception : net.sf.hibernate.QueryException: could not resolve property: foo of: Foo [null] at net.sf.hibernate.persister.AbstractPropertyMapping.toColumns(AbstractPropertyMapping.java:45) at net.sf.hibernate.expression.AbstractCriterion.getColumns(AbstractCriterion.java:35) at net.sf.hibernate.expression.SimpleExpression.toSqlString(SimpleExpression.java:40) at net.sf.hibernate.loader.CriteriaLoader.<init>(CriteriaLoader.java:57) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3487) at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:165) at net.sf.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:310) at Test.testHibernate(Test.java:52) at Test.main(Test.java:25) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-417 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-417 Summary: Criteria API and key-many-to-one Type: Bug Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Reporter: Sebastien Cesbron Created: Wed, 22 Oct 2003 3:07 AM Updated: Wed, 22 Oct 2003 3:08 AM Environment: Win2k SQLServer with jTds driver Description: I have one class Bar with a primary key composed of a 'key-many-to-one' to a class Foo. I want to find a Bar instance with a Foo id so I have this criteria : Criteria criteria = session.createCriteria(Bar.class); criteria.createCriteria("foo").add(Expression.eq("id", new Integer(1))); Bar bar = (Bar) criteria.uniqueResult(); Then I have this sql statement select this.ID_FOO as ID_FOO0_, this.text as text0_ from BAR this where x0_.id=1 which fails because x0_ isn't defined. With an HQL query it works. --------------------------------------------------------------------- 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-10-23 02:23:36
|
The following comment has been added to this issue: Author: Nicolas Berthet Created: Wed, 22 Oct 2003 5:10 AM Body: This is a brief look of my process.. 1) i begin a transaction 2) i create some objects (one of them has a field over 5 Mo) 3) i commit the transaction and there an error occurs OutOfMemory the error occurs during the following call st.setBytes( index, (byte[]) value ); on line 24 from BinaryType.java i tried to get more information but i simply couldn't.. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-418 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-418 Summary: An large insert statement raise an java.lang.OutOfMemory Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 3 Assignee: Reporter: Nicolas Berthet Created: Wed, 22 Oct 2003 3:20 AM Updated: Wed, 22 Oct 2003 3:20 AM Environment: hiberate 2.1b3, webwork 2, resin Description: I'm trying to insert a 5 Mo file (BinaryType) and it raise an OutOfMemory.. i'm unable to trace where it come from... the same process works for files until about 4 Mo --------------------------------------------------------------------- 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-10-23 01:23:39
|
The following comment has been added to this issue: Author: Gavin King Created: Wed, 22 Oct 2003 3:52 AM Body: Another thing: it seems that you are ignoring the cache "region" and putting everything in one cache? This is broken, if thats the case.... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-412 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-412 Summary: OSCache support for Hibernate 2.1 Type: Improvement Status: Assigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: Mathias Bogaert Created: Mon, 20 Oct 2003 6:34 AM Updated: Tue, 21 Oct 2003 1:53 AM Environment: OSCache 2.0 and Hibernate 2.1 (CVS as from yesterday) Description: Attached is an example how to integrate OpenSymphony OSCache and Hibernate's 2.1 caching system. Because of the fact that the cache is not reponsible for refreshing, the nice fail-over feature of OSCache is not used (yet). --------------------------------------------------------------------- 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 |