----- Original Message -----
Sent: Friday, September 10, 2004 12:47
PM
Subject: RE: [Hibernate] Problems
mapping List with Hibernate xdoclet tag
Try something like the following to complete the DTD
requirements.
/** Returns the keyword list associated with the
referenced physical asset.
* @hibernate.list
table="ImageMasterKeywords" lazy="false"
cascade="save-update"
*
*
@hibernate.collection-key
*
column="KEYWORD_ID"
*
@hibernate.collection-index
*
column="KEYWORD_ORDER"
*
@hibernate.collection-composite-element
*
class="com.images.Keyword"
*
* @return List the keyworld list field.
*/
- Virender
This is what I'm doing:
/** Returns the
keyword list associated with the referenced physical asset.
*
@hibernate.list table="ImageMasterKeywords" lazy="false"
cascade="save-update"
*
* @return List the keyworld list
field.
*/
public List getKeywords()
{
return keywords;
}
And the error I get is this:
[hibernatedoclet]
org.xml.sax.SAXParseException: The content of element type "list" is
incomplete, it must ma
ch
"(meta*,(cache|jcs-cache)?,key,index,(element|one-to-many|many-to-many|composite-element|many-to-any))".
[hibernatedoclet]
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
[hibernatedoclet] at
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
[hibernatedoclet] at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[hibernatedoclet] at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[hibernatedoclet] at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
[hibernatedoclet] at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
[hibernatedoclet] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
I tried to all types of variations, but nothing
works. What is the correct way to store a simple List with Strings in a
separate table?
Thanks!
Michael