You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <leg...@at...> - 2003-12-04 21:37:42
|
Message: The following issue has been closed. Resolver: Max Rydahl Andersen Date: Thu, 4 Dec 2003 3:36 PM Fixed - thanks for finding this suttle one ;) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-522 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-522 Summary: Correct collection type for sorted collections Type: Patch Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Components: toolset Fix Fors: 2.1 rc1 Versions: 2.0.2 Assignee: Max Rydahl Andersen Reporter: Linus Kamb Created: Thu, 4 Dec 2003 11:46 AM Updated: Thu, 4 Dec 2003 3:36 PM Environment: Hibernate extensions 2.0.2 Description: When generating Java code from an hbm.xml file, all [sets|bags|maps] listed in the mapping file after a sorted [set|bag|map] will be generated as sorted. So, given the following mapping (in pseudo-hbm): Example (in pseudo-hbm :-) <mapping> <class name="SomeClass"> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> </class> </mapping> This correctly generates public class SomeClass { private Set plainSet; // plus Set-based getters and setters private SortedSet sortedSet; // plus SortedSet-based getters and setters. } now, if I change the mapping: <mapping> <class name="SomeClass"> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> </class> </mapping> This incorrectly generates public class SomeClass { private SortedSet sortedSet; // plus SortedSet-based getters and setters. private SortedSet plainSet; // plus SortedSet-based getters and setters. } [Since this is the first time I've entered anything in JIRA, and I don't see where to add that patch attachment, I am going to include it here.] --- hibernate-extensions-2.0.2/tools/src/net/sf/hibernate/tool/hbm2java/ClassMapping.java Tue Oct 21 15:14:16 2003 +++ /users/linus/projects/scratch/net/sf/hibernate/tools/hbm2java/ClassMapping.java Thu Dec 4 09:31:11 2003 @@ -488,6 +488,9 @@ private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass, MultiMap inheritedMeta) { + String originalInterface = interfaceClass; + String originalImplementingClass = implementingClass; + for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { Element collection = (Element) collections.next(); @@ -495,15 +498,21 @@ String name = collection.getAttributeValue("name"); // Small hack to switch over to sortedSet/sortedMap if sort is specified. (that is sort != unsorted) - if (!"unsorted".equals(collection.getAttributeValue("sort"))) { - if("map".equals(xmlName)) { - interfaceClass = SortedMap.class.getName(); - implementingClass = TreeMap.class.getName(); - } else if("set".equals(xmlName)) { - interfaceClass = SortedSet.class.getName(); - implementingClass = TreeSet.class.getName(); - } - } + String sort = collection.getAttributeValue("sort"); + if ("unsorted".equals(sort) || + "".equals(sort)) { + interfaceClass = originalInterface; + implementingClass = originalImplementingClass; + } + else { + if("map".equals(xmlName)) { + interfaceClass = SortedMap.class.getName(); + implementingClass = TreeMap.class.getName(); + } else if("set".equals(xmlName)) { + interfaceClass = SortedSet.class.getName(); + implementingClass = TreeSet.class.getName(); + } + } ClassName interfaceClassName = new ClassName(); ClassName implementingClassName = new ClassName(); @@ -513,10 +522,11 @@ // add an import and field for this collection addImport(interfaceClassName); --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: Max R. A. <ma...@ac...> - 2003-12-04 20:49:42
|
This should be posted to the forum! (and when you do, remember to show mapping file, java code and exception) /max David R Robison wrote: > I'm using a postgresql database. When I issue a session.iterate() > command, the iterator reports hasNext() as true yet when I call next() I > get an exception stating that there is nothing left to iterate over. > > Any ideas? > > thanks in advance, > David Robison > |
From: David R R. <drr...@op...> - 2003-12-04 20:27:00
|
I'm using a postgresql database. When I issue a session.iterate() command, the iterator reports hasNext() as true yet when I call next() I get an exception stating that there is nothing left to iterate over. Any ideas? thanks in advance, David Robison -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: drr...@op... web: http://openroadsconsulting.com |
From: <leg...@at...> - 2003-12-04 17:54:41
|
Message: The following issue has been re-assigned. Assignee: Max Rydahl Andersen (mailto:xa...@xa...) Assigner: Gavin King (mailto:ga...@hi...) Date: Thu, 4 Dec 2003 11:54 AM Comment: yours, max --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-522 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-522 Summary: Correct collection type for sorted collections Type: Patch Status: Open Priority: Minor Project: Hibernate2 Components: toolset Versions: 2.0.2 Assignee: Max Rydahl Andersen Reporter: Linus Kamb Created: Thu, 4 Dec 2003 11:46 AM Updated: Thu, 4 Dec 2003 11:54 AM Environment: Hibernate extensions 2.0.2 Description: When generating Java code from an hbm.xml file, all [sets|bags|maps] listed in the mapping file after a sorted [set|bag|map] will be generated as sorted. So, given the following mapping (in pseudo-hbm): Example (in pseudo-hbm :-) <mapping> <class name="SomeClass"> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> </class> </mapping> This correctly generates public class SomeClass { private Set plainSet; // plus Set-based getters and setters private SortedSet sortedSet; // plus SortedSet-based getters and setters. } now, if I change the mapping: <mapping> <class name="SomeClass"> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> </class> </mapping> This incorrectly generates public class SomeClass { private SortedSet sortedSet; // plus SortedSet-based getters and setters. private SortedSet plainSet; // plus SortedSet-based getters and setters. } [Since this is the first time I've entered anything in JIRA, and I don't see where to add that patch attachment, I am going to include it here.] --- hibernate-extensions-2.0.2/tools/src/net/sf/hibernate/tool/hbm2java/ClassMapping.java Tue Oct 21 15:14:16 2003 +++ /users/linus/projects/scratch/net/sf/hibernate/tools/hbm2java/ClassMapping.java Thu Dec 4 09:31:11 2003 @@ -488,6 +488,9 @@ private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass, MultiMap inheritedMeta) { + String originalInterface = interfaceClass; + String originalImplementingClass = implementingClass; + for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { Element collection = (Element) collections.next(); @@ -495,15 +498,21 @@ String name = collection.getAttributeValue("name"); // Small hack to switch over to sortedSet/sortedMap if sort is specified. (that is sort != unsorted) - if (!"unsorted".equals(collection.getAttributeValue("sort"))) { - if("map".equals(xmlName)) { - interfaceClass = SortedMap.class.getName(); - implementingClass = TreeMap.class.getName(); - } else if("set".equals(xmlName)) { - interfaceClass = SortedSet.class.getName(); - implementingClass = TreeSet.class.getName(); - } - } + String sort = collection.getAttributeValue("sort"); + if ("unsorted".equals(sort) || + "".equals(sort)) { + interfaceClass = originalInterface; + implementingClass = originalImplementingClass; + } + else { + if("map".equals(xmlName)) { + interfaceClass = SortedMap.class.getName(); + implementingClass = TreeMap.class.getName(); + } else if("set".equals(xmlName)) { + interfaceClass = SortedSet.class.getName(); + implementingClass = TreeSet.class.getName(); + } + } ClassName interfaceClassName = new ClassName(); ClassName implementingClassName = new ClassName(); @@ -513,10 +522,11 @@ // add an import and field for this collection addImport(interfaceClassName); --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-04 17:49:41
|
The following issue has been updated: Updater: Linus Kamb (mailto:li...@ir...) Date: Thu, 4 Dec 2003 11:49 AM Changes: Attachment changed to ClassMapping_v2.0.2.patch --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-522&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-522 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-522 Summary: Correct collection type for sorted collections Type: Patch Status: Unassigned Priority: Minor Project: Hibernate2 Components: toolset Versions: 2.0.2 Assignee: Reporter: Linus Kamb Created: Thu, 4 Dec 2003 11:46 AM Updated: Thu, 4 Dec 2003 11:49 AM Environment: Hibernate extensions 2.0.2 Description: When generating Java code from an hbm.xml file, all [sets|bags|maps] listed in the mapping file after a sorted [set|bag|map] will be generated as sorted. So, given the following mapping (in pseudo-hbm): Example (in pseudo-hbm :-) <mapping> <class name="SomeClass"> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> </class> </mapping> This correctly generates public class SomeClass { private Set plainSet; // plus Set-based getters and setters private SortedSet sortedSet; // plus SortedSet-based getters and setters. } now, if I change the mapping: <mapping> <class name="SomeClass"> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> </class> </mapping> This incorrectly generates public class SomeClass { private SortedSet sortedSet; // plus SortedSet-based getters and setters. private SortedSet plainSet; // plus SortedSet-based getters and setters. } [Since this is the first time I've entered anything in JIRA, and I don't see where to add that patch attachment, I am going to include it here.] --- hibernate-extensions-2.0.2/tools/src/net/sf/hibernate/tool/hbm2java/ClassMapping.java Tue Oct 21 15:14:16 2003 +++ /users/linus/projects/scratch/net/sf/hibernate/tools/hbm2java/ClassMapping.java Thu Dec 4 09:31:11 2003 @@ -488,6 +488,9 @@ private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass, MultiMap inheritedMeta) { + String originalInterface = interfaceClass; + String originalImplementingClass = implementingClass; + for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { Element collection = (Element) collections.next(); @@ -495,15 +498,21 @@ String name = collection.getAttributeValue("name"); // Small hack to switch over to sortedSet/sortedMap if sort is specified. (that is sort != unsorted) - if (!"unsorted".equals(collection.getAttributeValue("sort"))) { - if("map".equals(xmlName)) { - interfaceClass = SortedMap.class.getName(); - implementingClass = TreeMap.class.getName(); - } else if("set".equals(xmlName)) { - interfaceClass = SortedSet.class.getName(); - implementingClass = TreeSet.class.getName(); - } - } + String sort = collection.getAttributeValue("sort"); + if ("unsorted".equals(sort) || + "".equals(sort)) { + interfaceClass = originalInterface; + implementingClass = originalImplementingClass; + } + else { + if("map".equals(xmlName)) { + interfaceClass = SortedMap.class.getName(); + implementingClass = TreeMap.class.getName(); + } else if("set".equals(xmlName)) { + interfaceClass = SortedSet.class.getName(); + implementingClass = TreeSet.class.getName(); + } + } ClassName interfaceClassName = new ClassName(); ClassName implementingClassName = new ClassName(); @@ -513,10 +522,11 @@ // add an import and field for this collection addImport(interfaceClassName); --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-04 17:47:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-522 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-522 Summary: Correct collection type for sorted collections Type: Patch Status: Unassigned Priority: Minor Project: Hibernate2 Components: toolset Versions: 2.0.2 Assignee: Reporter: Linus Kamb Created: Thu, 4 Dec 2003 11:46 AM Updated: Thu, 4 Dec 2003 11:46 AM Environment: Hibernate extensions 2.0.2 Description: When generating Java code from an hbm.xml file, all [sets|bags|maps] listed in the mapping file after a sorted [set|bag|map] will be generated as sorted. So, given the following mapping (in pseudo-hbm): Example (in pseudo-hbm :-) <mapping> <class name="SomeClass"> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> </class> </mapping> This correctly generates public class SomeClass { private Set plainSet; // plus Set-based getters and setters private SortedSet sortedSet; // plus SortedSet-based getters and setters. } now, if I change the mapping: <mapping> <class name="SomeClass"> <set name="sortedSet" sort="MySorter" > <one-to-many class="YAClass" /> </set> <set name="plainSet"> <one-to-many class="SomeOtherClass" /> </set> </class> </mapping> This incorrectly generates public class SomeClass { private SortedSet sortedSet; // plus SortedSet-based getters and setters. private SortedSet plainSet; // plus SortedSet-based getters and setters. } [Since this is the first time I've entered anything in JIRA, and I don't see where to add that patch attachment, I am going to include it here.] --- hibernate-extensions-2.0.2/tools/src/net/sf/hibernate/tool/hbm2java/ClassMapping.java Tue Oct 21 15:14:16 2003 +++ /users/linus/projects/scratch/net/sf/hibernate/tools/hbm2java/ClassMapping.java Thu Dec 4 09:31:11 2003 @@ -488,6 +488,9 @@ private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass, MultiMap inheritedMeta) { + String originalInterface = interfaceClass; + String originalImplementingClass = implementingClass; + for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { Element collection = (Element) collections.next(); @@ -495,15 +498,21 @@ String name = collection.getAttributeValue("name"); // Small hack to switch over to sortedSet/sortedMap if sort is specified. (that is sort != unsorted) - if (!"unsorted".equals(collection.getAttributeValue("sort"))) { - if("map".equals(xmlName)) { - interfaceClass = SortedMap.class.getName(); - implementingClass = TreeMap.class.getName(); - } else if("set".equals(xmlName)) { - interfaceClass = SortedSet.class.getName(); - implementingClass = TreeSet.class.getName(); - } - } + String sort = collection.getAttributeValue("sort"); + if ("unsorted".equals(sort) || + "".equals(sort)) { + interfaceClass = originalInterface; + implementingClass = originalImplementingClass; + } + else { + if("map".equals(xmlName)) { + interfaceClass = SortedMap.class.getName(); + implementingClass = TreeMap.class.getName(); + } else if("set".equals(xmlName)) { + interfaceClass = SortedSet.class.getName(); + implementingClass = TreeSet.class.getName(); + } + } ClassName interfaceClassName = new ClassName(); ClassName implementingClassName = new ClassName(); @@ -513,10 +522,11 @@ // add an import and field for this collection addImport(interfaceClassName); --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-04 16:01:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-521 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-521 Summary: ScrollableResults from Criteria class Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Assignee: Reporter: Don DeLuca Created: Thu, 4 Dec 2003 10:00 AM Updated: Thu, 4 Dec 2003 10:00 AM Environment: JDBC 2.0 compliant database that supports result set scrolling. Description: I've been using the Criteria API provided by Hibernate. Its really excellent. Would it be possible to provide scrolling functionality in the Criteria API similar to that in the Query API which has a scroll() method that returns a ScrollableResults object. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-04 13:09:46
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-520 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-520 Summary: Add Distinct to Criteria API Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: Stephen Owens Created: Thu, 4 Dec 2003 7:08 AM Updated: Thu, 4 Dec 2003 7:08 AM Environment: Hibernate 2.1+, (Any DB) Description: Need the ability to specify that results of a Criteria query should be 'DISTINCT', especially when joining to a collection. So the Criteria equivalent of the HQL statement "select distinct parent from Parent as parent join Parent.children as child where child.age>5" --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-04 07:17:47
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 4 Dec 2003 1:17 AM Well, I made it at least generate something sensible like "foo in ()". It turns out that most SQL dialects don't actually support this syntax - but thats ok, I think. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-517 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-517 Summary: Expression.in(String, Collection) doesn't check Collection.size()==0 automatically Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Fix Fors: 2.1 final Versions: 2.1 rc1 Assignee: Gavin King Reporter: fafnirchen Created: Thu, 4 Dec 2003 12:56 AM Updated: Thu, 4 Dec 2003 1:17 AM Environment: w2k, jdk1.4 Description: I used Expression.in(column:String, inValue:Collection) to add query condition. As for argument Collection it is a dnynamic List. When inValue.size()==0 I do not want Expression add condition string like xxxColumn in (?).Now when inValue.size()==0 Hibernate2 throws Exception when Criteria.list(). The fragment of my code is the following. Criteria crit = session.createCriteria(WsStockPriceModel.class); crit.add( Expression.between( "pubDate", model.getSearchBeginDate(), model.getSearchEndDate())); crit.add(Expression.in("productName", model.getSearchProductNames())); crit.setFirstResult(firstResult); crit.setMaxResults(pageSize); List list = crit.list(); And the fragment of Exception is the following. java.lang.NegativeArraySizeException at java.lang.StringBuffer.<init>(StringBuffer.java:115) at net.sf.hibernate.util.StringHelper.repeat(StringHelper.java:47) at net.sf.hibernate.expression.InExpression.toSqlString(InExpression.java:26) at net.sf.hibernate.loader.CriteriaLoader.<init>(CriteriaLoader.java:61) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3430) at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:177) ............................... --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-04 06:57:42
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-517 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-517 Summary: Expression.in(String, Collection) doesn't check Collection.size()==0 automatically Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 rc1 Assignee: Reporter: fafnirchen Created: Thu, 4 Dec 2003 12:56 AM Updated: Thu, 4 Dec 2003 12:56 AM Environment: w2k, jdk1.4 Description: I used Expression.in(column:String, inValue:Collection) to add query condition. As for argument Collection it is a dnynamic List. When inValue.size()==0 I do not want Expression add condition string like xxxColumn in (?).Now when inValue.size()==0 Hibernate2 throws Exception when Criteria.list(). The fragment of my code is the following. Criteria crit = session.createCriteria(WsStockPriceModel.class); crit.add( Expression.between( "pubDate", model.getSearchBeginDate(), model.getSearchEndDate())); crit.add(Expression.in("productName", model.getSearchProductNames())); crit.setFirstResult(firstResult); crit.setMaxResults(pageSize); List list = crit.list(); And the fragment of Exception is the following. java.lang.NegativeArraySizeException at java.lang.StringBuffer.<init>(StringBuffer.java:115) at net.sf.hibernate.util.StringHelper.repeat(StringHelper.java:47) at net.sf.hibernate.expression.InExpression.toSqlString(InExpression.java:26) at net.sf.hibernate.loader.CriteriaLoader.<init>(CriteriaLoader.java:61) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3430) at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:177) ............................... --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 23:44:41
|
Message: The following issue has been closed. Resolver: David Channon Date: Wed, 3 Dec 2003 5:44 PM Incomplete or corrupted version of hibernate2.1 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: David Channon Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Wed, 3 Dec 2003 5:44 PM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 17:55:42
|
The following comment has been added to this issue: Author: Daniel Rosenbaum Created: Wed, 3 Dec 2003 11:55 AM Body: Hmm, something very interesting happened. I downloaded the nightly snapshot from last night, built it and used the jars in my app. It now works! My guess is that I was previously running against a possibly incomplete version, where some files were updated and some weren't. This caused the strange behavior. I thank everyone for their patience and help. I'm glad it turned out to be nothing. I hope when things quiet down on my project I can contribute back to Hibernate in some way. Good work! Daniel --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Open Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: David Channon Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Wed, 3 Dec 2003 11:55 AM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 13:34:42
|
The following comment has been added to this issue: Author: David Channon Created: Wed, 3 Dec 2003 7:33 AM Body: I have a large series of tests from which to generate the mappings for the Middlegen plugin. I have one test similar in structure to your design and the one-to-one mapping generated correctly with a reference to the property which should exist in the POJO since its a key-many-to-one. I will wait for the extra information before going further. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Open Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: David Channon Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Wed, 3 Dec 2003 7:33 AM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 13:22:41
|
The following comment has been added to this issue: Author: David Channon Created: Wed, 3 Dec 2003 7:22 AM Body: Other than the extra column you have added I cannot see any issues with the mapping document. Unfortunately, your missing atleast two mapping document to complete the picture. One of which is a one-to-one mapping to one of the composite foreign keys. This maybe the cause of the issue since it may be generating a primary key join mapping (since both sides are primary keys) which would explain the error (although you have said it worked in 2.1beta6). If the one-to-one does not explain it, I would also like you to remove the XDoclet meta markup and try again (you have already generated the POJOs so it should not be an issue). The goal is to try and minimise the potential causes. If it still does not work then send me ALL the mapping documents [POJOS would be nice as well](cut down as much as possible so as to illustrate it working in 2.1b6 and not in 2.1rc1). --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Open Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: David Channon Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Wed, 3 Dec 2003 7:22 AM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 13:11:52
|
Message: The following issue has been re-assigned. Assignee: David Channon (mailto:da...@hi...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Open Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: David Channon Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Wed, 3 Dec 2003 7:11 AM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 03:31:41
|
The following comment has been added to this issue: Author: Daniel Rosenbaum Created: Tue, 2 Dec 2003 9:31 PM Body: Oops it seems that a bit of my manual manipiulation trying to get it to work got into the code that I posted. I apologize for that oversight. The column="FLDR_CLMN_NUM" line should never have been posted. What I actually got from middlegen is the following: <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> Yet I still got that exception. I will confirm this tomorrow, but I am pretty sure this was tainted by mistake. A quick look at the velocity template confirms this. I do not think there were any other places I manually manipulated this either. Please have a look once again and I apologize once again for my oversight. Thanks, Daniel --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Tue, 2 Dec 2003 9:31 PM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 02:24:41
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 2 Dec 2003 8:24 PM Done, Thanks --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-514 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-514 Summary: SybaseAnywhereDialect should return " for open and close quote Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 final Versions: 2.1 beta 4 Assignee: Reporter: John Urberg Created: Tue, 2 Dec 2003 11:06 AM Updated: Tue, 2 Dec 2003 8:24 PM Environment: Sybase ASA 7.0.4, Windows 2000, Sybase JConnect 5.5 JDBC driver, Hibernate 2.1 beta 4 Description: The SybaseAnywhereDialect uses the default sybase quote characters of [ and ]. The Sybase ASA database requires " as the quote characters. This can be changed by adding the following two methods to SybaseAnywhereDialect: public char closeQuote() { return '"'; } public char openQuote() { return '"'; } --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 02:22:44
|
The following comment has been added to this issue: Author: Gavin King Created: Tue, 2 Dec 2003 8:21 PM Body: Yes, looks reasonable. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-515 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-515 Summary: Allow a different persister for a Subclass Type: Patch Status: Open Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: Nick Johnson Created: Tue, 2 Dec 2003 2:47 PM Updated: Tue, 2 Dec 2003 8:21 PM Environment: Hibernate from CVS, using the same branch we used for our custom collection persister patch (see HB-419) Description: In some cases it is desirable to persist a subclass differently than a class; for example, if the subclass is persisting a different number of fields or if the fields are in a different order for some reason. This patch allows a different persister to be bound to a Subclass. If one is not defined, the parent class's persister is used (as was the case before). --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 02:12:41
|
The following comment has been added to this issue: Author: Gavin King Created: Tue, 2 Dec 2003 8:12 PM Body: Looks like the problem is probably to do with this mapping: <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" column="FLDR_CLMN_NUM"> <column name="FLDR_CLMN_NUM" /> </key-many-to-one> which is actually broken, since you aren't meant to combine column attributes with column elements. perhaps the Hibernate core should do a bit better exception checking of this. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Tue, 2 Dec 2003 8:12 PM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 01:53:41
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@hi...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-511 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-511 Summary: ClassCastException while caching queries with "select new..." Type: Bug Status: Open Priority: Minor Project: Hibernate2 Versions: 2.1 beta 6 Assignee: Gavin King Reporter: Daniel Rosenbaum Created: Mon, 1 Dec 2003 1:37 PM Updated: Tue, 2 Dec 2003 7:53 PM Environment: 2.1 beta 6 Description: I have code similar to the example from section 9.4 in the docs: Query query = HibernateSession.currentSession().createQuery( "select new Family(mother, mate, offspr) " + "from eg.DomesticCat as mother " + " join mother.mate as mate " + " left join mother.kittens as offspr"); query.setCacheable(true); query.setCacheRegion("FamilyQueryCache"); return query.list(); When this runs though I get the following exception: java.lang.ClassCastException: Family at net.sf.hibernate.cache.QueryCache.put(QueryCache.java:53) at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:967) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1483) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:45) seems that the code is trying to cast the Family object into an Object[]. The code works if I turn caching off. But if I try to cache a query that uses "select new ..." it generates this exception. Best regards, Daniel Rosenbaum --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-03 01:49:41
|
The following comment has been added to this issue: Author: Daniel Rosenbaum Created: Tue, 2 Dec 2003 7:49 PM Body: Another followup: The schema. Unfortunatly I am now on my other computer and do not have access to the schema. I partially constructed it from memory though, I can provide a more complete one if necessary tomorrow morning US Eastern time. I hope I have this accurate as well: create table QWB_EXTRCT_VW { EXTRCT_VW_NUM NUMBER not null, other columns......, primary key(EXTRCT_VW_NUM) }; create table QWB_EXTRCT_VW_CLMN { EXTRCT_VW_NUM NUMBER not null, FLDR_CLMN_NUM NUMBER not null, other columns....., primary key (EXTRCT_VW_NUM), primary key (FLDR_CLMN_NUM), CONSTRAINT SYS_1 FOREIGN KEY (EXTRCT_VW_NUM) REFERENCES QWB_EXTRCT_VW(EXTRCT_VW_NUM), CONSTRAINT SYS_2 FOREIGN KEY (FLDR_CLMN_NUM) REFERENCES QWB_FLDR_CLMN(FLDR_CLMN_NUM), ); create table QWB_FLDR { FLDR_NUM NUMBER not null, other columns......, primary key (FLDR_NUM) }; create table QWB_FLDR_CLMN { FLDR_CLMN_NUM NUMBER not null, FLDR_NUM not null, primary key (FLDR_CLMN_NUM) CONSTRAINT SYS_3 FOREIGN KEY (FLDR_NUM) REFERENCES QWB_FLDR(FLDR_NUM), }; Note that table QWB_FLDR_CLMN has only one primary key and one separrte foreign key while QWB_EXTRCT_VW_CLMN has two primary keys which themselves are foreign keys as well. I hope this helps. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Tue, 2 Dec 2003 7:49 PM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-02 23:14:41
|
The following comment has been added to this issue: Author: Daniel Rosenbaum Created: Tue, 2 Dec 2003 5:14 PM Body: Hmm, I just noticed something. Perhaps it would help. Note the exception once again: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) It is looking for QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM] as the primary key of the QWB_FLDR_CLMN table, but the table in fact really has only FLDR_CLMN_NUM as the PK. FLDR_NUM is a many-to-one association to a different table, the QwbFldr table. For some reason though Hibernate is thinking that the FLDR_NUM column is part of the PK! As I said, FLDR_NUM is part of a totally different association. Hibernate seems to be confusing it. Daniel --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Tue, 2 Dec 2003 5:14 PM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-02 23:07:41
|
The following comment has been added to this issue: Author: Daniel Rosenbaum Created: Tue, 2 Dec 2003 5:07 PM Body: As a follow up, here are my complete mapping files: <?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> <!-- Created by Middlegen Hibernate plugin http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ --> <class name="testQwb.hibernate.persistent.QwbExtrctVwClmn" table="QWB_EXTRCT_VW_CLMN" > <meta attribute="field-description"> @hibernate.class table="QWB_EXTRCT_VW_CLMN" </meta> <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" column="FLDR_CLMN_NUM" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> <property name="sqncNum" type="int" column="SQNC_NUM" not-null="true" length="6" > <meta attribute="field-description"> @hibernate.property column="SQNC_NUM" length="6" not-null="true" </meta> </property> <property name="srtSqncNum" type="byte" column="SRT_SQNC_NUM" length="2" > <meta attribute="field-description"> @hibernate.property column="SRT_SQNC_NUM" length="2" </meta> </property> <property name="srtSqncCd" type="java.lang.String" column="SRT_SQNC_CD" length="1" > <meta attribute="field-description"> @hibernate.property column="SRT_SQNC_CD" length="1" </meta> </property> <property name="otptDataTypeCd" type="java.lang.String" column="OTPT_DATA_TYPE_CD" length="4" > <meta attribute="field-description"> @hibernate.property column="OTPT_DATA_TYPE_CD" length="4" </meta> </property> <property name="otptDataOfstCnt" type="int" column="OTPT_DATA_OFST_CNT" length="5" > <meta attribute="field-description"> @hibernate.property column="OTPT_DATA_OFST_CNT" length="5" </meta> </property> <property name="otptDataLngthCnt" type="short" column="OTPT_DATA_LNGTH_CNT" length="4" > <meta attribute="field-description"> @hibernate.property column="OTPT_DATA_LNGTH_CNT" length="4" </meta> </property> <property name="otptDataScaleCnt" type="boolean" column="OTPT_DATA_SCALE_CNT" length="1" > <meta attribute="field-description"> @hibernate.property column="OTPT_DATA_SCALE_CNT" length="1" </meta> </property> <property name="creatTs" type="java.sql.Timestamp" column="CREAT_TS" not-null="true" length="7" > <meta attribute="field-description"> @hibernate.property column="CREAT_TS" length="7" not-null="true" </meta> </property> <property name="creatUserId" type="java.lang.String" column="CREAT_USER_ID" not-null="true" length="20" > <meta attribute="field-description"> @hibernate.property column="CREAT_USER_ID" length="20" not-null="true" </meta> </property> <property name="updtTs" type="java.sql.Timestamp" column="UPDT_TS" length="7" > <meta attribute="field-description"> @hibernate.property column="UPDT_TS" length="7" </meta> </property> <property name="updtUserId" type="java.lang.String" column="UPDT_USER_ID" length="20" > <meta attribute="field-description"> @hibernate.property column="UPDT_USER_ID" length="20" </meta> </property> <!-- associations --> </class> </hibernate-mapping> <?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> <!-- Created by Middlegen Hibernate plugin http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ --> <class name="testQwb.hibernate.persistent.QwbFldrClmn" table="QWB_FLDR_CLMN" > <meta attribute="field-description"> @hibernate.class table="QWB_FLDR_CLMN" </meta> <id name="fldrClmnNum" type="int" column="FLDR_CLMN_NUM" > <meta attribute="field-description"> @hibernate.id generator-class="assigned" type="int" column="FLDR_CLMN_NUM" </meta> <generator class="assigned" /> </id> <property name="clmnNum" type="int" column="CLMN_NUM" not-null="true" length="6" > <meta attribute="field-description"> @hibernate.property column="CLMN_NUM" length="6" not-null="true" </meta> </property> <property name="sqncNum" type="int" column="SQNC_NUM" not-null="true" length="6" > <meta attribute="field-description"> @hibernate.property column="SQNC_NUM" length="6" not-null="true" </meta> </property> <property name="creatTs" type="java.sql.Timestamp" column="CREAT_TS" not-null="true" length="7" > <meta attribute="field-description"> @hibernate.property column="CREAT_TS" length="7" not-null="true" </meta> </property> <property name="creatUserId" type="java.lang.String" column="CREAT_USER_ID" not-null="true" length="20" > <meta attribute="field-description"> @hibernate.property column="CREAT_USER_ID" length="20" not-null="true" </meta> </property> <property name="updtTs" type="java.sql.Timestamp" column="UPDT_TS" length="7" > <meta attribute="field-description"> @hibernate.property column="UPDT_TS" length="7" </meta> </property> <property name="updtUserId" type="java.lang.String" column="UPDT_USER_ID" length="20" > <meta attribute="field-description"> @hibernate.property column="UPDT_USER_ID" length="20" </meta> </property> <!-- associations --> <!-- bi-directional many-to-one association to QwbFldr --> <many-to-one name="qwbFldr" class="testQwb.hibernate.persistent.QwbFldr" not-null="true" > <meta attribute="field-description"> @hibernate.many-to-one not-null="true" @hibernate.column name="FLDR_NUM" </meta> <column name="FLDR_NUM" /> </many-to-one> </class> </hibernate-mapping> --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Tue, 2 Dec 2003 5:07 PM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-02 22:56:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-516 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-516 Summary: 2.1RC1 breaks some Middlegen generated files w/ foreign keys Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.1 rc1 Assignee: Reporter: Daniel Rosenbaum Created: Tue, 2 Dec 2003 4:56 PM Updated: Tue, 2 Dec 2003 4:56 PM Environment: 2.1RC1 with Oracle Description: I have two tables, QWB_EXTRCT_VW_CLMN and QWB_FLDR_CLMN. QWB_EXTRCT_VW_CLMN has a composite primary key with columns EXTRCT_VW_NUM and FLDR_CLMN_NUM, FLDR_CLMN_NUM being a foreign key to the (single) primary key of the QWB_FLDR_CLMN table. Middlegen generates the following mapping for QwbFldrClmn: <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwbExtrctVwClmnPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- uni-directional one-to-one association to QwbFldrClmn --> <key-many-to-one name="qwbFldrClmn" class="testQwb.hibernate.persistent.QwbFldrClmn" > <column name="FLDR_CLMN_NUM" /> </key-many-to-one> <!-- bi-directional many-to-one association to QwbExtrctVw --> <key-many-to-one name="qwbExtrctVw" class="testQwb.hibernate.persistent.QwbExtrctVw" > <column name="EXTRCT_VW_NUM" /> </key-many-to-one> </composite-id> However when run the following exception is thrown: net.sf.hibernate.MappingException: Foreign key (QWB_EXTRCT_VW_CLMN [FLDR_CLMN_NUM])) must have same number of columns as the reference primary key (QWB_FLDR_CLMN [FLDR_NUM,FLDR_CLMN_NUM]) at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:625) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:719) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) at testQwb.hibernate.TestHibernate3.main(TestHibernate3.java:22) Note that this xml works with the 2.1 beta 6, but not with RC1. Is Middlegen not putting something in? BTW in general I am having a heck of a time migrating from 2.1 Beta 6 to RC1 using Middlegen created XML files. Seems to me to be a good idea to do more testing with Middlegen and Hibernate to make sure the generated files work. Or else modify Hibernate or Middlegen so they would cooperate better. Also please note that this is NOT the same problem as with HB-512, I am already using the patched code but yet I now have this new error. Thanks, Daniel --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-02 22:35:41
|
Message: The following issue has been closed. Resolver: Max Rydahl Andersen Date: Tue, 2 Dec 2003 4:34 PM this have been around too long - mainly my fault. I tried to apply that patch to the current cvs but it did not match very well ;( I welcome a new updated version if possible - until then I'll close it. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-48 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-48 Summary: More finder generation Type: Patch Status: Closed Priority: Major Resolution: INCOMPLETE Project: Hibernate2 Assignee: Max Rydahl Andersen Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:31 AM Updated: Tue, 2 Dec 2003 4:34 PM Description: More finder generation Finder generator now supports generation based on class relationships, a la: <set name="games" inverse="true" lazy="true" table="GamePlayers"> <meta attribute="foreign-finder-name">findSavedGames</meta> <meta attribute="foreign-finder-field">save</meta> <meta attribute="foreign-join-field">players</meta> <key column="playerID"/> <many-to-many class="com.whatever.Game" column="gameID"/> </set> There's more information in the updated javadocs in FinderRenderer.java. The new classes MethodSignatureBuilder and QueryBuilder are a start at extracting this kind of functionality into seperate classes. I'll improve the javadocs as they mature a bit. http://sourceforge.net/tracker/index.php?func=detail&aid=722221&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 |