Message:
The following issue has been closed.
Resolver: Gavin King
Date: Sun, 12 Oct 2003 12:19 PM
This is intended, since a synthetic composite key is non-meaningful. Anyway it can be done using the "audit info custom type" pattern.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-389
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-389
Summary: DTD does not allow 'generator'-tag in 'composite-id', whereas Hibernate does and works perfect
Type: Bug
Status: Closed
Priority: Minor
Resolution: REJECTED
Project: Hibernate2
Versions:
2.0.3
Assignee:
Reporter: Jan-Allard Slurink
Created: Thu, 9 Oct 2003 2:37 AM
Updated: Sun, 12 Oct 2003 12:19 PM
Environment: W2K SP4, JDK 1.3
Description:
Consider this part of the mapping-file:
<class name="AdresModel" table="ADRES">
<composite-id name="adresnr" class="AdresnrModel">
<key-property name="adresnr"/>
<generator class="AdresnrPKGenerator">
<param name="sequence">SEQ_ADRES</param>
</generator>
</composite-id>
...
...
I have a wrapper named AdresnrModel (with only one field) for my custom PK, and I want to use a PK-Generator mapped to an oracle sequence with it.
The error I get is this:
2003-10-08 15:00:33,309 ERROR net.sf.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(20)
org.xml.sax.SAXParseException: Element "composite-id" does not allow "generator" here.
void org.apache.crimson.parser.Parser2.error(java.lang.String, java.lang.Object[])
Despite the SAXParseException, Hibernate WORKS and does perfectly what I want.
So the bug is: Either the DTD does not support the above Hibernate feature, OR hibernate allows this feature whereas it shouldn't allow it.
My best guess is that the DTD should be updated to the current capabilities of Hibernate
---------------------------------------------------------------------
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
|