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-08-12 19:38:09
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-253 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-253 Summary: Filter with "elements(this.employees)" clause Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 beta 1 Assignee: Reporter: Alessandro Vernet Created: Tue, 12 Aug 2003 2:20 PM Updated: Tue, 12 Aug 2003 2:20 PM Description: I am doing a: session.filter(regions, "where ? in elements(this.employees)", employee, Hibernate.entity(Employee.class)); Where Region.hbm.xml defines employees as: <hibernate-mapping> <class name="bean.Region" table="owf_region" mutable="false"> ... <set name="employees" table="owf_employee_region"> <key column="region_id"/> <many-to-many class="bean.Employee" column="employee_id"/> </set> </class> </hibernate-mapping> I get: net.sf.hibernate.QueryException: could not resolve property: employees [where ? in elements(this.employees)] at net.sf.hibernate.persister.AbstractPropertyMapping.getPropertyType(AbstractPropertyMapping.java:33) at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:242) at net.sf.hibernate.hql.PathExpressionParser.token(PathExpressionParser.java:122) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:333) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:365) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:250) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87) at net.sf.hibernate.hql.PreprocessingParser.end(PreprocessingParser.java:142) at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:30) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:148) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:135) at net.sf.hibernate.hql.FilterTranslator.compile(FilterTranslator.java:25) at net.sf.hibernate.impl.SessionFactoryImpl.getFilter(SessionFactoryImpl.java:269) at net.sf.hibernate.impl.SessionImpl.getFilterTranslator(SessionImpl.java:3149) at net.sf.hibernate.impl.SessionImpl.filter(SessionImpl.java:3169) at net.sf.hibernate.impl.SessionImpl.filter(SessionImpl.java:3109) I expected this to work. Pretty much the same HQL works just fine when used in a session.createQuery(), e.g.: session.createQuery("from Region as r where ? in elements(r.employees)").setEntity(0, employee).list() Alex --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 18:55:46
|
The following comment has been added to this issue: Author: abe zafar Created: Tue, 12 Aug 2003 1:47 PM Body: I took the latest code from cvs last night and tried the following: <many-to-one name="state" class="com.rhi.domain.StateImpl" column="state_id"> <meta attribute="property-type">com.rhi.domain.State</meta> </many-to-one> My expectation was that I would get a setter and a getter method for "com.rhi.domain.State", but I still get the setter and getter for "com.rhi.domain.StateImpl". I will attach the source if I can that I got from cvs just in case this is not the latest. If you have the latest source or binary that has the changes can you please attach it to this issue so I can get it right away. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-243 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-243 Summary: Polymorphic associations are not handled properly Type: Improvement Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: toolset Fix Fors: 2.1 Versions: 2.0 final Assignee: Max Rydahl Andersen Reporter: abe zafar Created: Sun, 10 Aug 2003 2:54 AM Updated: Sun, 10 Aug 2003 12:04 PM Environment: JDK1.4 Description: If I have an association like this one: <many-to-one classname="com.hp.Printer"/> and Printer does not have a mapping but it is an interface for a class called com.hp.ColorPrinter that does have a mapping, I would get two methods generated as I would expect: public void setPrinter( Printer printer ) { ... } public Printer getPrinter() { ... } But since "com.hp.Printer" was never mapped I would get a rutime exception saying cannot find the mapping. If through some other tag or the <many-to-one> tag itself I can indicate that use the interface type for code generation but use the implementation class to look for the mapping the problem would be solved. For example if we had something like this: <many-to-one compile-time-class="com.hp.Printer" run-time-class="com.hp.ColorPrinter"/> then the setter and getter would be generated using the compile-time-class and the run-time-class would be used to look up the mapping at runtime. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 17:24:01
|
The following comment has been added to this issue: Author: abe zafar Created: Tue, 12 Aug 2003 12:17 PM Body: Thanks that works. By changing the meta tag from: <meta attribute="implements">com.rhi.domain.Person</meta> to: <meta inherit="false" attribute="implements">com.rhi.domain.Person</meta> The interface gets only implemented by the class indicated in the class tag. I personally think this feature of inherting the meta tag is not very intuitive. I don't think very often one wants all its classes to implement the same interface or pass another meta attribute to all its classes and methods. I think it would be more intuitive if the meta tag is applied to only the tags which it is a direct child of. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-242 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-242 Summary: <meta attribute="implements"> does not behave as expected Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: abe zafar Created: Sun, 10 Aug 2003 2:40 AM Updated: Sun, 10 Aug 2003 6:37 AM Environment: JDK1.4 Description: If the tag <meta attribute="implements">com.hp.Printer</meta> is inserted as a child of the class tag it properly adds the implement clause to the class. But if that class also contained a <composite-id> tag which indicated a class then that class would also UNEXPECTEDLY implement the interface "com.hp.Printer". So in the following example: <class name="com.hp.ColorPrinter"> <meta attribute="implements">com.hp.Printer</meta> <composite-id name="propertyName" class="com.hp.PrinterId"> <key-property name="propertyName" type="typename" column="column_name"/> <key-many-to-one name="propertyName class="ClassName" column="column_name"/> </composite-id> Both "ColorPrinter" and "PrinterId" end up implementing "com.hp.Printer". ColorPrinter is expected to implement the interface, but PrinterId should not implement the interface. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 15:50:12
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 12 Aug 2003 10:44 AM I have implemented this. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-20 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-20 Summary: lock() a transient object Type: Improvement Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Fix Fors: 2.1 beta 2 Assignee: Gavin King Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:10 AM Updated: Tue, 12 Aug 2003 10:44 AM Description: lock() a transient object It would be very useful to be able to associate a transient object with the session (obtaining an appropriate lock-level by, for example, a version check). Currently the only way to do this is to use update(). That would be overkill if we aren't updating the object. (original: http://sourceforge.net/tracker/index.php?func=detail&aid=635016&group_id=40712&atid=428711) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 13:53:09
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 12 Aug 2003 8:01 AM I've fixed this in the 2.1 branch. I don't think its worth doing the fix for 2.0 branch .... the workaround is very easy: add a cascade="none" to the array mapping (the XML parser will complain, but it will work). --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-250 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-250 Summary: Cascade onto primitive-array Type: Bug Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Fix Fors: 2.1 beta 2 Assignee: Reporter: Teradyne Inc. Created: Tue, 12 Aug 2003 3:32 AM Updated: Tue, 12 Aug 2003 8:01 AM Environment: Windows XP Pro Java 1.4.1_02 MySQL 4.0.13-nt Description: If class: public class Foo { private int[] exponents; public Foo() {} public int[] getExponents() { return exponents; } public void setExponents(int[] exps) { this.exponents = exps; } } Is mapped with the following ..hbm.xml: <hibernate-mapping default-cascade="save-update"> <class name="Foo" table="foos"> <id column="id" type="int"> <generator class="native" /> </id> <primitive-array name="exponents" > <key/> <index/> <element type="integer"/> </primitive-array> </class> </hibernate-mapping> It causes the following error: java.lang.ClassCastException at net.sf.hibernate.type.ArrayType.getElementsIterator(ArrayType.java:42) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:276) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:341) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:739) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:605) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1213) at net.sf.hibernate.engine.Cascades$3.cascade(Cascades.java:88) --------------------------------------------- This method should only be called if you enable cascade for that collection (which makes no sense for a primitive array). For more details please read: https://sourceforge.net/forum/message.php?msg_id=2145750 --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 12:04:15
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@in...) Assigner: Gavin King (mailto:ga...@in...) Date: Tue, 12 Aug 2003 7:03 AM Comment: Yep, I can see how that would happen ;) aaahhh ... brand new features! --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-251 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-251 Summary: error query table with "where" attribute in <class> mapping Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Versions: 2.0.2 Assignee: Gavin King Reporter: Dominik Roblek Created: Tue, 12 Aug 2003 6:32 AM Updated: Tue, 12 Aug 2003 7:03 AM Description: I added "where" attribute to <class> mapping of Party class, which has Person and Organization subclasses mapped via <joined-subclass>. When executing Hibernate scalar query, is table column from "where" condition prefixed with wrong table alias. It is prefixed with Person table alias instead of Party table alias. It causes SQL error. Here is my hbm.xml: --- <hibernate-mapping> <class name="si.marand.maf.server.jastreb.party.module.entity.PartyEntity" table="Party" dynamic-update="false" dynamic-insert="false" where="MAF_Deleted=0"> <jcs-cache usage="read-write"/> <id name="id" column="Party_ID" type="java.lang.Long" unsaved-value="0"> ... </id> ... <joined-subclass name="si.marand.maf.server.jastreb.party.module.entity.PersonEntity" table="Person" dynamic-update="false" dynamic-insert="false" proxy="si.marand.maf.server.jastreb.party.module.entity.PersonEntity"> <key column="Person_ID"/> ... </joined-subclass> <joined-subclass name="si.marand.maf.server.jastreb.party.module.entity.OrganizationEntity" table="Organization" dynamic-update="false" dynamic-insert="false"> <key column="Organization_ID"/> ... </joined-subclass> </class> </hibernate-mapping> --- Here is wrongly generated query: --- select personen0_.Person_ID as x0_0_, personen0_.First_Name as x1_0_, personen0_.Last_Name as x2_0_, personen0__1.Party_Id_Num as x3_0_, addresse2_.Street_1 as x4_0_, addresse2_.Street_2 as x5_0_, addresse2_.Street_3 as x6_0_, addresse2_.Street_4 as x7_0_ from Person personen0_ inner join Party personen0__1 on personen0_.Person_ID=personen0__1.Party_ID inner join Party_Address partyadd1_ on personen0_.Person_ID=partyadd1_.Party_ID inner join Address addresse2_ on partyadd1_.Address_ID=addresse2_.Address_ID where personen0_.MAF_Deleted=0 and (((personen0__1.MAF_Deleted=0 ))and((addresse2_.Street_1 like ? )or(addresse2_.Street_2 like ? ) or(addresse2_.Street_3 like ? )or(addresse2_.Street_4 like ? ))) --- Condition "MAF_Deleted=0" should be prefixed with "personen0__1" alias instead of "personen0_" alias. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 11:33:14
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-251 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-251 Summary: error query table with "where" attribute in <class> mapping Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.0.2 Assignee: Reporter: Dominik Roblek Created: Tue, 12 Aug 2003 6:32 AM Updated: Tue, 12 Aug 2003 6:32 AM Description: I added "where" attribute to <class> mapping of Party class, which has Person and Organization subclasses mapped via <joined-subclass>. When executing Hibernate scalar query, is table column from "where" condition prefixed with wrong table alias. It is prefixed with Person table alias instead of Party table alias. It causes SQL error. Here is my hbm.xml: --- <hibernate-mapping> <class name="si.marand.maf.server.jastreb.party.module.entity.PartyEntity" table="Party" dynamic-update="false" dynamic-insert="false" where="MAF_Deleted=0"> <jcs-cache usage="read-write"/> <id name="id" column="Party_ID" type="java.lang.Long" unsaved-value="0"> ... </id> ... <joined-subclass name="si.marand.maf.server.jastreb.party.module.entity.PersonEntity" table="Person" dynamic-update="false" dynamic-insert="false" proxy="si.marand.maf.server.jastreb.party.module.entity.PersonEntity"> <key column="Person_ID"/> ... </joined-subclass> <joined-subclass name="si.marand.maf.server.jastreb.party.module.entity.OrganizationEntity" table="Organization" dynamic-update="false" dynamic-insert="false"> <key column="Organization_ID"/> ... </joined-subclass> </class> </hibernate-mapping> --- Here is wrongly generated query: --- select personen0_.Person_ID as x0_0_, personen0_.First_Name as x1_0_, personen0_.Last_Name as x2_0_, personen0__1.Party_Id_Num as x3_0_, addresse2_.Street_1 as x4_0_, addresse2_.Street_2 as x5_0_, addresse2_.Street_3 as x6_0_, addresse2_.Street_4 as x7_0_ from Person personen0_ inner join Party personen0__1 on personen0_.Person_ID=personen0__1.Party_ID inner join Party_Address partyadd1_ on personen0_.Person_ID=partyadd1_.Party_ID inner join Address addresse2_ on partyadd1_.Address_ID=addresse2_.Address_ID where personen0_.MAF_Deleted=0 and (((personen0__1.MAF_Deleted=0 ))and((addresse2_.Street_1 like ? )or(addresse2_.Street_2 like ? ) or(addresse2_.Street_3 like ? )or(addresse2_.Street_4 like ? ))) --- Condition "MAF_Deleted=0" should be prefixed with "personen0__1" alias instead of "personen0_" alias. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 08:35:19
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-250 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-250 Summary: Cascade onto primitive-array Type: Bug Status: Unassigned Priority: Minor Project: Hibernate2 Assignee: Reporter: Teradyne Inc. Created: Tue, 12 Aug 2003 3:32 AM Updated: Tue, 12 Aug 2003 3:32 AM Environment: Windows XP Pro Java 1.4.1_02 MySQL 4.0.13-nt Description: If class: public class Foo { private int[] exponents; public Foo() {} public int[] getExponents() { return exponents; } public void setExponents(int[] exps) { this.exponents = exps; } } Is mapped with the following ..hbm.xml: <hibernate-mapping default-cascade="save-update"> <class name="Foo" table="foos"> <id column="id" type="int"> <generator class="native" /> </id> <primitive-array name="exponents" > <key/> <index/> <element type="integer"/> </primitive-array> </class> </hibernate-mapping> It causes the following error: java.lang.ClassCastException at net.sf.hibernate.type.ArrayType.getElementsIterator(ArrayType.java:42) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:276) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:341) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:739) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:605) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1213) at net.sf.hibernate.engine.Cascades$3.cascade(Cascades.java:88) --------------------------------------------- This method should only be called if you enable cascade for that collection (which makes no sense for a primitive array). For more details please read: https://sourceforge.net/forum/message.php?msg_id=2145750 --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 08:23:14
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Tue, 12 Aug 2003 3:22 AM Body: Have you tried adding insert="false" to the meta attribute in the class ? It may surprise you to see that what happens is that the class GETS the meta tag (as it is in the class), but the meta tag is NOT inherited by any sub-tags. Please say if you have tried it and it then did not work, because then we have a bug - and then i would like to see you hbm.xml which does not work. Here is what i expect you to do ;) <class name="com.rhi.domain.impl.Person" table="people"> <meta inherit="false" attribute="implements">com.rhi.domain.Person</meta> <composite-id name="pk" class="com.rhi.domain.impl.id.PersonPk"> <key-property name="personId" column="person_id" type="java.lang.Long"/> <key-property name="personRegionId" column="person_region_id" type="java.lang.Long"/> </composite-id> <property name="number" column="people_no" type="java.lang.Long"/> <property name="firstName" column="first_name" type="java.lang.String"/> <property name="middleName" column="middle_name" type="java.lang.String"/> <property name="lastName" column="last_name" type="java.lang.String"/> </class> --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-242 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-242 Summary: <meta attribute="implements"> does not behave as expected Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: abe zafar Created: Sun, 10 Aug 2003 2:40 AM Updated: Sun, 10 Aug 2003 6:37 AM Environment: JDK1.4 Description: If the tag <meta attribute="implements">com.hp.Printer</meta> is inserted as a child of the class tag it properly adds the implement clause to the class. But if that class also contained a <composite-id> tag which indicated a class then that class would also UNEXPECTEDLY implement the interface "com.hp.Printer". So in the following example: <class name="com.hp.ColorPrinter"> <meta attribute="implements">com.hp.Printer</meta> <composite-id name="propertyName" class="com.hp.PrinterId"> <key-property name="propertyName" type="typename" column="column_name"/> <key-many-to-one name="propertyName class="ClassName" column="column_name"/> </composite-id> Both "ColorPrinter" and "PrinterId" end up implementing "com.hp.Printer". ColorPrinter is expected to implement the interface, but PrinterId should not implement the interface. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 08:08:23
|
The following comment has been added to this issue: Author: Dhananjay Nene Created: Tue, 12 Aug 2003 3:05 AM Body: Forgot to add one more utility class - as follows : <pre> class ClassToIntValue { private Integer intVal; private Class clazz; public ClassToIntValue(Integer intVal, Class clazz) { this.intVal = intVal; this.clazz = clazz; } public Integer getIntVal() { return intVal; } public Class getClazz() { return clazz; } } </pre> --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-249 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-249 Summary: CustomType for mapping classes onto Integers for use with <any> Type: Patch Status: Unassigned Priority: Minor Project: Hibernate2 Assignee: Reporter: Dhananjay Nene Created: Tue, 12 Aug 2003 3:03 AM Updated: Tue, 12 Aug 2003 3:03 AM Environment: Not applicable Description: The default mapping mechanism for <any> mapping is the class name. This custom type allows for creating integer values for each class, and mapping the classes onto the integer values. Thus the table needs to have a integer column and a column corresponding to the primary key of the other table. Using this class requires creating a derived class as suggested below. Sample mapping will be as follows : Scenario : An invoice table stores a reference to a Customer. Customer is an abstract base class and has two derived classes ExternalCustomer and InternalCustomer. Table-per-concreteclass mapping is used. Invoice table has two columns for mapping the customer - customerType and customerId. CustomerType == 1 implies InternalCustomer, CustomerType == 2 implies ExternalCustomer. InvoiceClass has a method called getCustomer() <!-- Mapping snippet in Invoice table --> <any name="customer" id-type="long" meta-type="com.example.hibernate.customtype.CustomerTypeMapper"> <column name="customerType"/> <column name="customerId"/> </any> /*********************************************************** Class created by End User ***********************************************************/ public class CustomerTypeMapper extends ClassToIntegerMapper { static public final Integer INTERNAL_CUSTOMER = new Integer(1); static public final Integer EXTERNAL_CUSTOMER = new Integer(2); static final private ClassToIntValue[] mappings = { new ClassToIntValue(INTERNAL_CUSTOMER, InternalCustomer.class), new ClassToIntValue(EXTERNAL_CUSTOMER, ExternalCustomer.class) }; public ClassToIntValue[] getMappings() { return mappings; } } /*********************************************************** Class which reflects this patch itself ***********************************************************/ package com.example.hibernate.customtype; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import net.sf.hibernate.Hibernate; import net.sf.hibernate.HibernateException; import net.sf.hibernate.UserType; /** * @author Dhananjay Nene */ abstract public class ClassToIntegerMapper implements UserType { static final private int[] TYPES = {Types.INTEGER }; abstract public ClassToIntValue[] getMappings(); public int[] sqlTypes() { return TYPES; } public Class returnedClass() { return java.lang.Class.class; } public boolean equals(Object arg0, Object arg1) throws HibernateException { if (arg0 == arg1) return true; if ((arg0 == null) || (arg1 == null)) return false; return ((java.lang.Class) arg0).equals((java.lang.Class) arg1); } public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { Integer result = (Integer) Hibernate.INTEGER.nullSafeGet(rs,names[0]); if(result == null) { return null; } ClassToIntValue[] mappings = getMappings(); for(int i = 0 ; i < mappings.length ; i++) { if (result.equals(mappings[i].getIntVal())) { return mappings[i].getClazz(); } } return null; } public void nullSafeSet(PreparedStatement stmt, Object value, int index) throws HibernateException, SQLException { java.lang.Class clazz = (java.lang.Class) value; if (clazz == null) { Hibernate.INTEGER.nullSafeSet(stmt,null,index); return; } Integer intval = null; ClassToIntValue[] mappings = getMappings(); for(int i = 0 ; i < mappings.length ; i++) { if (clazz.equals(mappings[i].getClazz())) { intval = mappings[i].getIntVal(); } } Hibernate.INTEGER.nullSafeSet(stmt,intval,index); } public Object deepCopy(Object arg0) throws HibernateException { if (arg0 == null) return null; Class clazz = (Class)arg0; Class newClazz = (Class) Hibernate.CLASS.deepCopy(clazz); return newClazz; } public boolean isMutable() { return false; } } --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 08:04:14
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-249 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-249 Summary: CustomType for mapping classes onto Integers for use with <any> Type: Patch Status: Unassigned Priority: Minor Project: Hibernate2 Assignee: Reporter: Dhananjay Nene Created: Tue, 12 Aug 2003 3:03 AM Updated: Tue, 12 Aug 2003 3:03 AM Environment: Not applicable Description: The default mapping mechanism for <any> mapping is the class name. This custom type allows for creating integer values for each class, and mapping the classes onto the integer values. Thus the table needs to have a integer column and a column corresponding to the primary key of the other table. Using this class requires creating a derived class as suggested below. Sample mapping will be as follows : Scenario : An invoice table stores a reference to a Customer. Customer is an abstract base class and has two derived classes ExternalCustomer and InternalCustomer. Table-per-concreteclass mapping is used. Invoice table has two columns for mapping the customer - customerType and customerId. CustomerType == 1 implies InternalCustomer, CustomerType == 2 implies ExternalCustomer. InvoiceClass has a method called getCustomer() <!-- Mapping snippet in Invoice table --> <any name="customer" id-type="long" meta-type="com.example.hibernate.customtype.CustomerTypeMapper"> <column name="customerType"/> <column name="customerId"/> </any> /*********************************************************** Class created by End User ***********************************************************/ public class CustomerTypeMapper extends ClassToIntegerMapper { static public final Integer INTERNAL_CUSTOMER = new Integer(1); static public final Integer EXTERNAL_CUSTOMER = new Integer(2); static final private ClassToIntValue[] mappings = { new ClassToIntValue(INTERNAL_CUSTOMER, InternalCustomer.class), new ClassToIntValue(EXTERNAL_CUSTOMER, ExternalCustomer.class) }; public ClassToIntValue[] getMappings() { return mappings; } } /*********************************************************** Class which reflects this patch itself ***********************************************************/ package com.example.hibernate.customtype; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import net.sf.hibernate.Hibernate; import net.sf.hibernate.HibernateException; import net.sf.hibernate.UserType; /** * @author Dhananjay Nene */ abstract public class ClassToIntegerMapper implements UserType { static final private int[] TYPES = {Types.INTEGER }; abstract public ClassToIntValue[] getMappings(); public int[] sqlTypes() { return TYPES; } public Class returnedClass() { return java.lang.Class.class; } public boolean equals(Object arg0, Object arg1) throws HibernateException { if (arg0 == arg1) return true; if ((arg0 == null) || (arg1 == null)) return false; return ((java.lang.Class) arg0).equals((java.lang.Class) arg1); } public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { Integer result = (Integer) Hibernate.INTEGER.nullSafeGet(rs,names[0]); if(result == null) { return null; } ClassToIntValue[] mappings = getMappings(); for(int i = 0 ; i < mappings.length ; i++) { if (result.equals(mappings[i].getIntVal())) { return mappings[i].getClazz(); } } return null; } public void nullSafeSet(PreparedStatement stmt, Object value, int index) throws HibernateException, SQLException { java.lang.Class clazz = (java.lang.Class) value; if (clazz == null) { Hibernate.INTEGER.nullSafeSet(stmt,null,index); return; } Integer intval = null; ClassToIntValue[] mappings = getMappings(); for(int i = 0 ; i < mappings.length ; i++) { if (clazz.equals(mappings[i].getClazz())) { intval = mappings[i].getIntVal(); } } Hibernate.INTEGER.nullSafeSet(stmt,intval,index); } public Object deepCopy(Object arg0) throws HibernateException { if (arg0 == null) return null; Class clazz = (Class)arg0; Class newClazz = (Class) Hibernate.CLASS.deepCopy(clazz); return newClazz; } public boolean isMutable() { return false; } } --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 07:57:03
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 12 Aug 2003 2:55 AM As per the documentation, HQL does not yet allow algebraic expressions in the SELECT clause. There is an existing feature request for this ... which you are welcome to tackle, if you like ;) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-247 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-247 Summary: Aggregate and expression Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Versions: 2.1 Assignee: Reporter: Alessandro Vernet Created: Mon, 11 Aug 2003 7:58 PM Updated: Tue, 12 Aug 2003 2:55 AM Description: The code: session.iterate("select p.year, sum(f.units), sum(a.units), sum(f.units*pp.listPrice)" + " from Period p" + " left outer join p.forecasts f" + " left outer join p.actuals a" + " left outer join p.productPrices pp" + " where p.period >= ? and p.period <= ?" + " and f.customer = ? and f.product = ? and f.employee = ?" + " and a.customer = ? and a.product = ? and a.employee = ?" + " and pp.customer = ? and pp.product = ?" + " group by p.year order by p.year", ... The important part is the "sum(f.units*pp.listPrice)". Hibernate generates this query: select period0_.year as x0_0_, sum(forecast1_.units) as x1_0_, sum(actuals2_.units) as x2_0_, sum(forecast1_.units*productp3_.list) as x3_0_ from owf_period period0_ left outer join owf_forecast forecast1_ on period0_.period=forecast1_.period left outer join owf_actual actuals2_ on period0_.period=actuals2_.period left outer join owf_product_price productp3_ on period0_.period=productp3_.period where (period0_.period>=? )and(period0_.period<=? )and(forecast1_.customer_id=? )and(forecast1_.product_id=? )and(forecast1_.employee_id=? )and(actuals2_.customer_id=? )and(actuals2_.product_id=? )and(actuals2_.employee_id=? )and(productp3_.customer_id=? )and(productp3_.product_id=? ) group by period0_.year order by period0_.year Running this throws the exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid column name: x4_0_ at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getColumnOrdinal(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getInt(Unknown Source) at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:159) at net.sf.hibernate.type.IntegerType.get(IntegerType.java:14) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:60) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51) at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:62) at net.sf.hibernate.impl.IteratorImpl.<init>(IteratorImpl.java:44) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:835) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1439) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1416) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 07:57:01
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 12 Aug 2003 2:54 AM It might have "worked" in the sense of not throwing an exception .... but it would have been semantically incorrect. That set mapping can only contain one element! --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-248 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-248 Summary: Repeated column in mapping Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Versions: 2.1 beta 1 Assignee: Reporter: Alessandro Vernet Created: Mon, 11 Aug 2003 8:02 PM Updated: Tue, 12 Aug 2003 2:54 AM Description: Declaring in a mapping: <set name="employeeIds" table="owf_employee_region"> <key column="employee_id"/> <element column="employee_id" type="long"/> </set> Throws the exception: net.sf.hibernate.MappingException: Repeated column in mapping for collection: bean.Region.employeeIds column: employee_id at net.sf.hibernate.collection.CollectionPersister.checkColumnDuplication(CollectionPersister.java:884) at net.sf.hibernate.collection.CollectionPersister.<init>(CollectionPersister.java:193) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:146) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:647) I think this used to work with 2.0.2. Alex --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 01:15:13
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-247 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-247 Summary: Aggregate and expression Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 Assignee: Reporter: Alessandro Vernet Created: Mon, 11 Aug 2003 7:58 PM Updated: Mon, 11 Aug 2003 7:58 PM Description: The code: session.iterate("select p.year, sum(f.units), sum(a.units), sum(f.units*pp.listPrice)" + " from Period p" + " left outer join p.forecasts f" + " left outer join p.actuals a" + " left outer join p.productPrices pp" + " where p.period >= ? and p.period <= ?" + " and f.customer = ? and f.product = ? and f.employee = ?" + " and a.customer = ? and a.product = ? and a.employee = ?" + " and pp.customer = ? and pp.product = ?" + " group by p.year order by p.year", ... The important part is the "sum(f.units*pp.listPrice)". Hibernate generates this query: select period0_.year as x0_0_, sum(forecast1_.units) as x1_0_, sum(actuals2_.units) as x2_0_, sum(forecast1_.units*productp3_.list) as x3_0_ from owf_period period0_ left outer join owf_forecast forecast1_ on period0_.period=forecast1_.period left outer join owf_actual actuals2_ on period0_.period=actuals2_.period left outer join owf_product_price productp3_ on period0_.period=productp3_.period where (period0_.period>=? )and(period0_.period<=? )and(forecast1_.customer_id=? )and(forecast1_.product_id=? )and(forecast1_.employee_id=? )and(actuals2_.customer_id=? )and(actuals2_.product_id=? )and(actuals2_.employee_id=? )and(productp3_.customer_id=? )and(productp3_.product_id=? ) group by period0_.year order by period0_.year Running this throws the exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid column name: x4_0_ at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getColumnOrdinal(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getInt(Unknown Source) at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:159) at net.sf.hibernate.type.IntegerType.get(IntegerType.java:14) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:60) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51) at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:62) at net.sf.hibernate.impl.IteratorImpl.<init>(IteratorImpl.java:44) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:835) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1439) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1416) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-12 01:11:48
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-248 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-248 Summary: Repeated column in mapping Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 beta 1 Assignee: Reporter: Alessandro Vernet Created: Mon, 11 Aug 2003 8:02 PM Updated: Mon, 11 Aug 2003 8:02 PM Description: Declaring in a mapping: <set name="employeeIds" table="owf_employee_region"> <key column="employee_id"/> <element column="employee_id" type="long"/> </set> Throws the exception: net.sf.hibernate.MappingException: Repeated column in mapping for collection: bean.Region.employeeIds column: employee_id at net.sf.hibernate.collection.CollectionPersister.checkColumnDuplication(CollectionPersister.java:884) at net.sf.hibernate.collection.CollectionPersister.<init>(CollectionPersister.java:193) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:146) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:647) I think this used to work with 2.0.2. Alex --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-11 17:19:40
|
The following comment has been added to this issue: Author: abe zafar Created: Mon, 11 Aug 2003 12:05 PM Body: Maybe this example will make my point more clear: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.rhi.domain.impl.Person" table="people"> <meta attribute="implements">com.rhi.domain.Person</meta> <composite-id name="pk" class="com.rhi.domain.impl.id.PersonPk"> <key-property name="personId" column="person_id" type="java.lang.Long"/> <key-property name="personRegionId" column="person_region_id" type="java.lang.Long"/> </composite-id> <property name="number" column="people_no" type="java.lang.Long"/> <property name="firstName" column="first_name" type="java.lang.String"/> <property name="middleName" column="middle_name" type="java.lang.String"/> <property name="lastName" column="last_name" type="java.lang.String"/> </class> </hibernate-mapping> The intention in this example is that the class "com.rhi.domain.impl.Person" should implement the interface "com.rhi.domain.Person" and the class "com.rhi.domain.impl.id.PersonPk" should NOT implement any interfaces. But what happens is both classes "com.rhi.domain.impl.Person" and "com.rhi.domain.impl.id.PersonPk" end up implementing "com.rhi.domain.Person". Now you are suggesting to put inherit="false" at the class level but that doesn't do what I need because I still want "com.rhi.domain.impl.Person" to implement the interface "com.rhi.domain.Person". --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-242 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-242 Summary: <meta attribute="implements"> does not behave as expected Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: abe zafar Created: Sun, 10 Aug 2003 2:40 AM Updated: Sun, 10 Aug 2003 6:37 AM Environment: JDK1.4 Description: If the tag <meta attribute="implements">com.hp.Printer</meta> is inserted as a child of the class tag it properly adds the implement clause to the class. But if that class also contained a <composite-id> tag which indicated a class then that class would also UNEXPECTEDLY implement the interface "com.hp.Printer". So in the following example: <class name="com.hp.ColorPrinter"> <meta attribute="implements">com.hp.Printer</meta> <composite-id name="propertyName" class="com.hp.PrinterId"> <key-property name="propertyName" type="typename" column="column_name"/> <key-many-to-one name="propertyName class="ClassName" column="column_name"/> </composite-id> Both "ColorPrinter" and "PrinterId" end up implementing "com.hp.Printer". ColorPrinter is expected to implement the interface, but PrinterId should not implement the interface. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-11 11:48:14
|
Message: The following issue has been closed. Resolver: Gavin King Date: Mon, 11 Aug 2003 6:46 AM OK, fixed now :) (v21branch) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-246 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-246 Summary: NPE in NormalizedEntityPersister.getIdentifierColumnNames() Type: Bug Status: Closed Priority: Critical Resolution: FIXED Project: Hibernate2 Components: core Versions: 2.1 beta 1 Assignee: Reporter: Thomas Jenny Created: Mon, 11 Aug 2003 4:50 AM Updated: Mon, 11 Aug 2003 6:46 AM Description: the mapping of my project worked fine in hibernate 2.0.x; with 2.1.beta1, the following exception is thrown when I try to build the session factory: java.lang.NullPointerException at net.sf.hibernate.persister.NormalizedEntityPersister.getIdentifierColumnNames(NormalizedEntityPersister.java:1075) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:699) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:646) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:32) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:647) at ... Looking at the code in AbstractEntityPersister and NormalizedEntityPersister, it seems that the constructor of the super class is calling getIdentifierColumnNames(), but the fields used in this getter haven't been initialized 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 |
From: <leg...@at...> - 2003-08-11 10:35:15
|
The following comment has been added to this issue: Author: Gavin King Created: Mon, 11 Aug 2003 5:34 AM Body: You'll notice that its working nicely for the *other* columns. ;) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-244 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-244 Summary: Hibernate creates alias identifiers that are too long Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Reporter: Mark Woon Created: Mon, 11 Aug 2003 1:17 AM Updated: Mon, 11 Aug 2003 5:21 AM Environment: Oracle 9.0.2. Description: After switching to Hibernate 2 I find that Hibernate is still creating alias identifiers that are too long. The HQL query that's causing it: select freqInSs, freqInRae, freqInSs.allele from DbVariantPosition as varPos, DbVariantAllele as varAl, DbAlleleFrequencyInSampleSet as freqInSs, DbAlleleFrequencyInRaceAndEthnicity as freqInRae where varPos.goldenPathPosition = ? and varPos.id != ? order by freqInSs, freqInRae The SQL query that gets generated: select dballele2_.alleleFreqInSampleSetsId as alleleFreqInSampleSetsId0_, dballele3_.alleleFreqInSSRaceEthnicityId as alleleFreqInSSRaceEthnicityId1_, dballele2_.variantPositionId as variantP2_0_, dballele2_.sampleSetId as sampleSe3_0_, dballele2_.allele as allele0_, dballele2_.totalObserved as totalObs5_0_, dballele2_.frequency as frequency0_, dballele3_.alleleFreqInSampleSetId as alleleFr2_1_, dballele3_.racialClassId as racialCl3_1_, dballele3_.ethnicClassId as ethnicCl4_1_, dballele3_.totalObserved as totalObs5_1_, dballele3_.frequency as frequency1_, dballele2_.alleleFreqInSampleSetsId as x0_0_, dballele3_.alleleFreqInSSRaceEthnicityId as x1_0_, dballele2_.allele as x2_0_ from VariantPositions dbvarian0_, VariantAlleles dbvarian1_, AlleleFreqInSampleSets dballele2_, AlleleFreqInSSRaceEthnicity dballele3_ where (dbvarian0_.goldenPathPosition=? )and(dbvarian0_.variantPositionId!=? ) order by dballele2_.alleleFreqInSampleSetsId , dballele3_.alleleFreqInSSRaceEthnicityId The offending alias identifier is "alleleFreqInSSRaceEthnicityId1_" which is 31 characters long -- one more that Oracle's max identifier length. Is this a known problem? I can attach my mappings if it will help... --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-11 10:23:14
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@in...) Date: Mon, 11 Aug 2003 5:21 AM Comment: Yes, the id and discriminator columns still suffer this problem. It might be easier to fix now, but the last time I looked it was still difficult. Changes: priority changed from Blocker --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-244&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-244 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-244 Summary: Hibernate creates alias identifiers that are too long Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Reporter: Mark Woon Created: Mon, 11 Aug 2003 1:17 AM Updated: Mon, 11 Aug 2003 5:21 AM Environment: Oracle 9.0.2. Description: After switching to Hibernate 2 I find that Hibernate is still creating alias identifiers that are too long. The HQL query that's causing it: select freqInSs, freqInRae, freqInSs.allele from DbVariantPosition as varPos, DbVariantAllele as varAl, DbAlleleFrequencyInSampleSet as freqInSs, DbAlleleFrequencyInRaceAndEthnicity as freqInRae where varPos.goldenPathPosition = ? and varPos.id != ? order by freqInSs, freqInRae The SQL query that gets generated: select dballele2_.alleleFreqInSampleSetsId as alleleFreqInSampleSetsId0_, dballele3_.alleleFreqInSSRaceEthnicityId as alleleFreqInSSRaceEthnicityId1_, dballele2_.variantPositionId as variantP2_0_, dballele2_.sampleSetId as sampleSe3_0_, dballele2_.allele as allele0_, dballele2_.totalObserved as totalObs5_0_, dballele2_.frequency as frequency0_, dballele3_.alleleFreqInSampleSetId as alleleFr2_1_, dballele3_.racialClassId as racialCl3_1_, dballele3_.ethnicClassId as ethnicCl4_1_, dballele3_.totalObserved as totalObs5_1_, dballele3_.frequency as frequency1_, dballele2_.alleleFreqInSampleSetsId as x0_0_, dballele3_.alleleFreqInSSRaceEthnicityId as x1_0_, dballele2_.allele as x2_0_ from VariantPositions dbvarian0_, VariantAlleles dbvarian1_, AlleleFreqInSampleSets dballele2_, AlleleFreqInSSRaceEthnicity dballele3_ where (dbvarian0_.goldenPathPosition=? )and(dbvarian0_.variantPositionId!=? ) order by dballele2_.alleleFreqInSampleSetsId , dballele3_.alleleFreqInSSRaceEthnicityId The offending alias identifier is "alleleFreqInSSRaceEthnicityId1_" which is 31 characters long -- one more that Oracle's max identifier length. Is this a known problem? I can attach my mappings if it will help... --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-11 10:21:14
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@in...) Date: Mon, 11 Aug 2003 5:20 AM Comment: Thanks. This is why we do betas ;) Changes: priority changed from Major --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-246&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-246 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-246 Summary: NPE in NormalizedEntityPersister.getIdentifierColumnNames() Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 beta 1 Assignee: Reporter: Thomas Jenny Created: Mon, 11 Aug 2003 4:50 AM Updated: Mon, 11 Aug 2003 5:20 AM Description: the mapping of my project worked fine in hibernate 2.0.x; with 2.1.beta1, the following exception is thrown when I try to build the session factory: java.lang.NullPointerException at net.sf.hibernate.persister.NormalizedEntityPersister.getIdentifierColumnNames(NormalizedEntityPersister.java:1075) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:699) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:646) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:32) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:647) at ... Looking at the code in AbstractEntityPersister and NormalizedEntityPersister, it seems that the constructor of the super class is calling getIdentifierColumnNames(), but the fields used in this getter haven't been initialized 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 |
From: <leg...@at...> - 2003-08-11 09:52:14
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-246 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-246 Summary: NPE in NormalizedEntityPersister.getIdentifierColumnNames() Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 1 Assignee: Reporter: Thomas Jenny Created: Mon, 11 Aug 2003 4:50 AM Updated: Mon, 11 Aug 2003 4:50 AM Description: the mapping of my project worked fine in hibernate 2.0.x; with 2.1.beta1, the following exception is thrown when I try to build the session factory: java.lang.NullPointerException at net.sf.hibernate.persister.NormalizedEntityPersister.getIdentifierColumnNames(NormalizedEntityPersister.java:1075) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:699) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:646) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:32) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:647) at ... Looking at the code in AbstractEntityPersister and NormalizedEntityPersister, it seems that the constructor of the super class is calling getIdentifierColumnNames(), but the fields used in this getter haven't been initialized 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 |
From: <leg...@at...> - 2003-08-11 09:40:14
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Mon, 11 Aug 2003 4:39 AM Body: the inherit="false" should be set on the meta tag for the class - not composite id. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-242 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-242 Summary: <meta attribute="implements"> does not behave as expected Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: abe zafar Created: Sun, 10 Aug 2003 2:40 AM Updated: Sun, 10 Aug 2003 6:37 AM Environment: JDK1.4 Description: If the tag <meta attribute="implements">com.hp.Printer</meta> is inserted as a child of the class tag it properly adds the implement clause to the class. But if that class also contained a <composite-id> tag which indicated a class then that class would also UNEXPECTEDLY implement the interface "com.hp.Printer". So in the following example: <class name="com.hp.ColorPrinter"> <meta attribute="implements">com.hp.Printer</meta> <composite-id name="propertyName" class="com.hp.PrinterId"> <key-property name="propertyName" type="typename" column="column_name"/> <key-many-to-one name="propertyName class="ClassName" column="column_name"/> </composite-id> Both "ColorPrinter" and "PrinterId" end up implementing "com.hp.Printer". ColorPrinter is expected to implement the interface, but PrinterId should not implement the interface. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-11 08:49:43
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-245 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-245 Summary: where attribute for <one-to-one> Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Assignee: Reporter: Steve Moore Created: Mon, 11 Aug 2003 3:44 AM Updated: Mon, 11 Aug 2003 3:44 AM Environment: ANY Description: to extend the use of <where> condition from Class and Collection to one-to-one. A sample use case: Product { Set pricings; } Pricing { Timestamp fromtime; Timestamp thrutime; } Product 1-n Pricing(varies over time) Product 1-1 Pricing(NOW) <- a derived relationship Pricing <many-to-one name="product" class="Product" unique="true"/> Product <one-to-many name="pricings" class="Pricing"/> ***** <one-to-one name"pricing" class="Pricing" property-ref="product" where="pricing.thrutime > NOW()"/> ***** --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-11 06:18:14
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-244 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-244 Summary: Hibernate creates alias identifiers that are too long Type: Bug Status: Unassigned Priority: Blocker Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Reporter: Mark Woon Created: Mon, 11 Aug 2003 1:17 AM Updated: Mon, 11 Aug 2003 1:17 AM Environment: Oracle 9.0.2. Description: After switching to Hibernate 2 I find that Hibernate is still creating alias identifiers that are too long. The HQL query that's causing it: select freqInSs, freqInRae, freqInSs.allele from DbVariantPosition as varPos, DbVariantAllele as varAl, DbAlleleFrequencyInSampleSet as freqInSs, DbAlleleFrequencyInRaceAndEthnicity as freqInRae where varPos.goldenPathPosition = ? and varPos.id != ? order by freqInSs, freqInRae The SQL query that gets generated: select dballele2_.alleleFreqInSampleSetsId as alleleFreqInSampleSetsId0_, dballele3_.alleleFreqInSSRaceEthnicityId as alleleFreqInSSRaceEthnicityId1_, dballele2_.variantPositionId as variantP2_0_, dballele2_.sampleSetId as sampleSe3_0_, dballele2_.allele as allele0_, dballele2_.totalObserved as totalObs5_0_, dballele2_.frequency as frequency0_, dballele3_.alleleFreqInSampleSetId as alleleFr2_1_, dballele3_.racialClassId as racialCl3_1_, dballele3_.ethnicClassId as ethnicCl4_1_, dballele3_.totalObserved as totalObs5_1_, dballele3_.frequency as frequency1_, dballele2_.alleleFreqInSampleSetsId as x0_0_, dballele3_.alleleFreqInSSRaceEthnicityId as x1_0_, dballele2_.allele as x2_0_ from VariantPositions dbvarian0_, VariantAlleles dbvarian1_, AlleleFreqInSampleSets dballele2_, AlleleFreqInSSRaceEthnicity dballele3_ where (dbvarian0_.goldenPathPosition=? )and(dbvarian0_.variantPositionId!=? ) order by dballele2_.alleleFreqInSampleSetsId , dballele3_.alleleFreqInSSRaceEthnicityId The offending alias identifier is "alleleFreqInSSRaceEthnicityId1_" which is 31 characters long -- one more that Oracle's max identifier length. Is this a known problem? I can attach my mappings if it will help... --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-08-11 03:57:14
|
The following comment has been added to this issue: Author: abe zafar Created: Sun, 10 Aug 2003 10:56 PM Body: I did try the inherit=false but that did not work because I got an error saying that the composite-id does not allow the meta-tag. If the composite-id did allow the meta tag then I agree with you, it would work. I don't know how to reopen this issue, so hopefully you will get my message. Thank you, --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-242 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-242 Summary: <meta attribute="implements"> does not behave as expected Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.1 Assignee: Reporter: abe zafar Created: Sun, 10 Aug 2003 2:40 AM Updated: Sun, 10 Aug 2003 6:37 AM Environment: JDK1.4 Description: If the tag <meta attribute="implements">com.hp.Printer</meta> is inserted as a child of the class tag it properly adds the implement clause to the class. But if that class also contained a <composite-id> tag which indicated a class then that class would also UNEXPECTEDLY implement the interface "com.hp.Printer". So in the following example: <class name="com.hp.ColorPrinter"> <meta attribute="implements">com.hp.Printer</meta> <composite-id name="propertyName" class="com.hp.PrinterId"> <key-property name="propertyName" type="typename" column="column_name"/> <key-many-to-one name="propertyName class="ClassName" column="column_name"/> </composite-id> Both "ColorPrinter" and "PrinterId" end up implementing "com.hp.Printer". ColorPrinter is expected to implement the interface, but PrinterId should not implement the interface. --------------------------------------------------------------------- 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 |