--- Marco Mistroni <[EMAIL PROTECTED]> wrote:

> Hello Konstantin,
>  sorry to get back late.
> i found solution...
> tag hibernate.collection-one-to-many has been
> replaced by
> hibernate.one-to-many

Tags have changed from XD1 to XD2 - there was a 
timeline of paralel development. 
> i have found the page where all tags are documented
> 
>
http://xdoclet.codehaus.org/HibernateTags#HibernateTags-hibernate.manytoone(for
> other users' reference.. i know you would know the
> address :)
> 
> meanwhile...latest build is 2.0.6-snapshot?

M2 plugin and XD core are in a stable release ( well,
there is a snapshot but no diff to released in last
year).  PLgins are at 1.0.4-SNAPHOST, and could be
released right now but I lack time to cater to all
the open issues. 

regards,


> thanks and regards
>  marco
> 
> 
> 
> 
> On 8/26/07, Konstantin Priblouda
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi Marco,
> >
> > I seen your mesages and will be able to look in
> depth
> > tomorrow.   Meanwhile, you can look into sources
> of
> > plugins - there are real samples in testcases
> which
> > are
> > known to work.
> >
> > Please assure also that you are using fresh
> snapshot
> > ( build it yourself maybe )
> >
> > regards,
> > --- Marco Mistroni <[EMAIL PROTECTED]> wrote:
> >
> > > hi all,
> > >  i am using xd2 mvn2 plugin to generate xdoclet
> > > files... but it looks like
> > > it is falling short when i am using
> associations..
> > >
> > > here is the class that is failing...
> > > code:
> > >
> > > package com.mm.backend.model;
> > >
> > > import java.util.ArrayList;
> > > import java.util.HashSet;
> > > import java.util.List;
> > > import java.util.Set;
> > >
> > > /**
> > >  * @hibernate.class table="ENTRYTYPES"
> > >  * @hibernate.discriminator
> column="discriminator"
> > >  *
> > >  */
> > >
> > >
> > > public class AbstractEntryType  {
> > >     protected String description;
> > >     protected Long id;
> > >     protected String discriminator;
> > >     protected Integer version;
> > >     protected List entries =
> > >                             new ArrayList();
> > >
> > >
> > >     /**
> > >      * @hibernate.property
> > >      * @return entry type description
> > >      */
> > >     public String getDescription() {
> > >         // TODO Auto-generated method stub
> > >         return description;
> > >     }
> > >
> > >     /**
> > >      * @hibernate.property
> column="discriminator"
> > >      *     insert="false"
> > >      *     update="false"
> > >      */
> > >     public String getDiscriminator() {
> > >         return discriminator;
> > >     }
> > >
> > >     /**
> > >      * @hibernate.id column="id"
> > >      *                
> generator-class="increment"
> > >      *                 unsaved-value="-1"
> > >      */
> > >     public Long getId() {
> > >         // TODO Auto-generated method stub
> > >         return id;
> > >     }
> > >
> > >
> > >     /**
> > >      * @hibernate.version
> > >      *                 unsaved-value="null"
> > >      * @return
> > >      */
> > >     public Integer getVersion() {
> > >         return version;
> > >     }
> > >
> > >
> > >     public void setDescription(String
> description) {
> > >         // TODO Auto-generated method stub
> > >         this.description = description;
> > >     }
> > >
> > >
> > >     public void setDiscriminator(String
> > > discriminator) {
> > >         this.discriminator = discriminator;
> > >     }
> > >
> > >     public void setId(Long id) {
> > >         this.id = id;
> > >     }
> > >
> > >     public void setVersion(Integer version) {
> > >         this.version = version;
> > >     }
> > >
> > >     /**
> > >      * @hibernate.list cascade="save-update"
> > >      * @hibernate.collection-one-to-many class="
> > > com.mm.backend.model.AbstractBudgetEntry"
> > >      * @hibernate.collection-key
> > > column="FK_ENTRY_ID"
> > >      * @return
> > >      */
> > >     public List getEntries() {
> > >         return entries;
> > >     }
> > >
> > >     public void setEntries(List entries) {
> > >         this.entries = entries;
> > >     }
> > >
> > >
> > >     /** common methods ***/
> > >     public boolean equals(Object o) {
> > >         if (this == o) return true;
> > >         if (!(o instanceof AbstractEntryType))
> > > return false;
> > >
> > >         final AbstractEntryType item =
> > > (AbstractEntryType) o;
> > >
> > >         if (! (id == item.getId()) ) return
> false;
> > >
> > >         return true;
> > >     }
> > >
> > >     public int hashCode() {
> > >         int result;
> > >         result = 29 * description.hashCode() +
> > > id.intValue() +
> > >                     version.hashCode();
> > >         return result;
> > >     }
> > >
> > >     public String toString() {
> > >         return  "id ('" + getId() + "'), " +
> > >                 "Desc: '" + getDescription();
> > >     }
> > >
> > >     public int compareTo(Object o) {
> > >         if (o instanceof AbstractEntryType) {
> > >             // Don't compare Date objects! Use
> the
> > > time in milliseconds!
> > >             return String.valueOf(id).compareTo(
> > >                         String.valueOf(
> > >
> > > ((AbstractEntryType)o).getId()));
> > >         }
> > >         return 0;
> > >     }
> > >
> > >
> > > }
> > >
> > >
> > > and here's the hbm.xml file that gets generated
> > >
> > > <hibernate-mapping>
> > > ¡Ý
> > >     <class table="ENTRYTYPES"
> > > name="com.mm.backend.model.AbstractEntryType">
> > > ¡Ý
> > >     <id unsaved-value="-1" name="id"
> column="id">
> > > <generator class="increment"/>
> > > </id>
> > > <discriminator column="discriminator"/>
> > > <version unsaved-value="null" name="version"/>
> > > <property name="description"/>
> > > <property name="discriminator"
> > > column="discriminator" update="false"
> > > insert="false"/>
> > > ¡Ý
> > >     <list cascade="save-update" name="entries">
> > > <key/>
> > > </list>
> > > <subclass
> name="com.mm.backend.model.ExpenseType"
> > > discriminator-value="Expense"/>
> > > <subclass
> name="com.mm.backend.model.SavingsType"
> > > discriminator-value="Savings"/>
> > > </class>
> > > </hibernate-mapping>
> > >
> > > somehow the key is not getting populated... so
> in
> > > the output i got this :
> > >
> > > [INFO] XDoclet plugin failed:
> > >    Line: 15 Column: 12
> > >    Message: The content of element type "list"
> is
> > > incomplete, it must match
> > > "(me
> > >
> >
> >
>
ta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-
> > >
> >
> >
>
to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-upda
> > > te?,sql-delete?,sql-delete-all?,filter*)".
> > >
> > > [INFO]
> > >
> >
>
------------------------------------------------------------------------
> > > [DEBUG] Trace
> > >
> >
>
org.apache.maven.lifecycle.LifecycleExecutionException:
> > > XDoclet plugin
> > > failed:
> > >    Line: 15 Column: 12
> > >    Message: The content of element type "list"
> is
> > > incomplete, it must match
> > > "(me
> > >
> >
> >
>
ta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-
> > >
> >
> >
>
to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-upda
> > > te?,sql-delete?,sql-delete-all?,filter*)".
> > >         at
> > >
> >
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> > > ultLifecycleExecutor.java:564)
> > >         at
> > >
> >
> >
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (
> > > DefaultLifecycleExecutor.java:480)
> > >         at
> > >
> >
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> > > ltLifecycleExecutor.java:459)
> > >         at
> > >
> >
> >
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (
> > > DefaultLifecycleExecutor.java:311)
> > >         at
> > >
> >
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> > > ts(
> > > DefaultLifecycleExecutor.java:278)
> > >         at
> > >
> >
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> > > fecycleExecutor.java:143)
> > >         at
> > >
> >
>
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> > >         at
> > >
> >
>
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> > >         at
> > >
> >
>
org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> > >         at
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > >         at
> > >
> >
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:39)
> > >         at
> > >
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > sorImpl.java:25)
> > >         at
> > > java.lang.reflect.Method.invoke(Method.java:585)
> > >         at
> > >
> >
>
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> > > :315)
> > >         at
> > >
> >
>
org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > >         at
> > >
> >
>
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> > > :430)
> > >         at
> > >
> >
>
org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > > Caused by:
> > > org.apache.maven.plugin.MojoExecutionException:
> > > XDoclet plugin
> > > failed :
> > >    Line: 15 Column: 12
> > >    Message: The content of element type "list"
> is
> > > incomplete, it must match
> > > "(me
> > >
> >
> >
>
ta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-
> > >
> >
> >
>
to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-upda
> > > te?,sql-delete?,sql-delete-all?,filter*)".
> > >         at
> > >
> >
>
org.codehaus.xdoclet.XDocletMojo.execute(XDocletMojo.java:158)
> > >         at
> > >
> >
>
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> > > nManager.java:443)
> > >         at
> > >
> >
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> > > ultLifecycleExecutor.java:539)
> > >         ... 16 more
> > > Caused by: org.generama.OutputValidationError:
> > >    Line: 15 Column: 12
> > >    Message: The content of element type "list"
> is
> > > incomplete, it must match
> > > "(me
> > >
> >
> >
>
ta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-
> > >
> >
> >
>
to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-upda
> > > te?,sql-delete?,sql-delete-all?,filter*)".
> > >         at
> > >
> >
>
org.generama.defaults.XMLOutputValidator.validate(XMLOutputValidator.
> > > java:97)
> > >         at
> > > org.generama.Plugin.start(Plugin.java:260)
> > >         at
> > >
> >
>
org.picocontainer.defaults.DefaultPicoContainer.start(DefaultPicoCont
> > > ainer.java:349)
> > >         at
> > >
> >
>
org.nanocontainer.integrationkit.LifecycleContainerBuilder.autoStart(
> > > LifecycleContainerBuilder.java:52)
> > >         at
> > >
> >
>
org.nanocontainer.integrationkit.LifecycleContainerBuilder.buildConta
> > > iner(
> > > LifecycleContainerBuilder.java:45)
> > >         at
> > >
> >
>
org.codehaus.xdoclet.XDocletMojo.execute(XDocletMojo.java:149)
> > >         ... 18 more
> > > [INFO]
> > >
> >
>
------------------------------------------------------------------------
> > > [INFO] Total time: 10 seco
> > >
> > > could anyone help?
> > >
> > > thanks and regards
> > >   marco
> > > >
> >
>
-------------------------------------------------------------------------
> > > This SF.net email is sponsored by: Splunk Inc.
> > > Still grepping through log files to find
> problems?
> > > Stop.
> > > Now Search log events and configuration files
> using
> > > AJAX and a browser.
> > > Download your FREE copy of Splunk now >>
> > http://get.splunk.com/>
> > _______________________________________________
> > > xdoclet-plugins-interest mailing list
> > > [email protected]
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest
> > >
> >
> >
> > ----[ Konstantin Pribluda http://www.pribluda.de
> ]----------------
> > JTec quality components:
> http://www.pribluda.de/projects/
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Pinpoint customers who are looking for what you
> sell.
> > http://searchmarketing.yahoo.com/
> >
> >
>
-------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?
>  Stop.
> > Now Search log events and configuration files
> using AJAX and a browser.
> > Download your FREE copy of Splunk now >> 
> http://get.splunk.com/
> > _______________________________________________
> > xdoclet-plugins-interest mailing list
> > [email protected]
> >
>
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest
> >
> >
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? 
> Stop.
> Now Search log events and configuration files using
> AJAX and a browser.
> Download your FREE copy of Splunk now >> 
http://get.splunk.com/>
_______________________________________________
> xdoclet-plugins-interest mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest
> 


----[ Konstantin Pribluda http://www.pribluda.de ]----------------
JTec quality components: http://www.pribluda.de/projects/


       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
xdoclet-plugins-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to