From: <leg...@at...> - 2003-08-22 14:47:33
|
The following comment has been added to this issue: Author: Les Hazlewood Created: Fri, 22 Aug 2003 9:46 AM Body: I was slightly off about the "Grandparent" constructor, as Party has no "PersonName" attribute. Other than that, the minimal constructor I added does allow complete compilation, so I guess that is what should be generated. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-283 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-283 Summary: Parent class constructor error - prevents compilation of a project Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Assignee: Reporter: Les Hazlewood Created: Fri, 22 Aug 2003 9:38 AM Updated: Fri, 22 Aug 2003 9:39 AM Environment: all Description: A rewrite of the email I wrote after discovering this bug: I think I've discovered a fairly serious bug with the joined-subclass class generation. Max Anderson confirmed this sounds like a bug, so I'm adding it to JIRA. (Please open attached hbm.xml file for reference when reading the rest of this description): Given the schema, a User ISA Person ISA Party ISA DatabaseObject. However, the generated code for the User class calls (in its "minimal" constructor): super(dbCreationTs, emailAddresses, phoneNumbers, postalAddresses, name); There is no constructor in the Person class with that signature (however, there is one like that in the Party class, which is the "Grandparent" of User. The Person class has only one constructor (no minimal constructor), and its signature is: Person (Calendar dbCreationTs, Set emailAddresses, Set phoneNumbers, Set postalAddresses, String gender, PersonName name); Therefore, the User class, in its minimal constructor, is trying to call a super constructor that doesn't exist (its actually trying to call a Grandparent constructor). I manually typed in a minimal constructor for Person just like the full constructor above, but leaving out gender, since it is nullable. (I believe this is how you generate a "minimal" constructor - leaving out nullable fields - but I could be wrong). After doing that, everything compiled fine. Is there a way that an update could be written fairly soon? Generated class compilation errors is a pretty substantial bug that would affect anyone. I also can't continue my current project until the correct OO hierarchy is in place and compiles. I am certainly willing to help out in any way that I can (testing, coding, etc). Thanks! Les Hazlewood --------------------------------------------------------------------- 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 |