Actually it didn't - after adding 'java.lang.String' as the composite-element I get the following error:
 
C:\eonline\projects\style2.0\ssms-common\build.xml:418: Schema text failed: Association references unmapped class: java.lang.String
----- Original Message -----
Sent: Tuesday, September 14, 2004 3:39 PM
Subject: [appfuse-user] Resolved: Problems mapping List with Hibernate xdoclet tag

This actually worked!!! Virender - you are the man! :-)
 
I was banging my head against the wall with this for days, and was about to give up.
 
Thanks for helping out.
 
Michael
----- 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

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Mehrle
Sent: Friday, September 10, 2004 1:42 PM
To: [EMAIL PROTECTED]
Subject: [Hibernate] Problems mapping List with Hibernate xdoclet tag

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
 

Reply via email to