--- Hung Vu <[EMAIL PROTECTED]> wrote:

> Hi,
>     I want to use idbag xdoclet tag in my project
> relating to Hibernate so I downloaded xdoclet cvs
> from
> http://xdoclet.sourceforge.net/xdoclet-cvs.zip and
> built it successfully. 
>    I had the following error:
>  (XDocletMain.start                   61  )
> <<Generated file [file:C:/testproject/model/Stu
> dent.hbm.xml:line 28] Message=[The content of
> element
> type "collection-id" is in
> complete, it must match
> "(meta*,column*,generator)".]
> is not valid according to
> its DTD or XML Schema. This might be due to some
> missing tags in your source.>>
> org.xml.sax.SAXParseException: The content of
> element
> type "co
> llection-id" is incomplete, it must match
> "(meta*,column*,generator)".
> 
>     I implemented all the required tags for
> "collection-id" such as column, generator-class,
> type
> but I still had this error.



Ih hibernate is what you are using I would suggest to
upgrade to XDoclet 2 ( contrary to stated on XD1
website it is already relased and of production
quality ) 

Then your IbBag would work like this 
( from actual testcase of hibernate plugin):

   /**
     * @hibernate.idbag lazy="true" table="idbag_id"
cascade="all"
     * @hibernate.collection-id generator-class="hilo"
type="long" column="collection_id"
     * @hibernate.generator-param name="a" value="b"
     * @hibernate.key column="key_column"
     * @hibernate.many-to-many
class="org.xdoclet.plugin.hibernate.pojo.ItemArray"
     * column="item" outer-join="true"
     * @hibernate.filter name="region" condition="REG
= :region"
     */
    public Collection getIdBag() {
        return idBag;
    }


And XD2 supports tag validation and line accurate
reporting where your source tags have a problem. 

See:
http://xdoclet.codehaus.org
regards,


----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org


                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to