Konstantin Priblouda wrote:
>
> --- Jim Bruno Goldberg <[EMAIL PROTECTED]>
> wrote:
> >
> > Thanks. I try it with the follow lines:
> >
> >
> > /**
> > * @hibernate.list table="teste2"
> > cascade="delete"
> > * @hibernate.collection-key column="enterprise"
> > * @hibernate.collection-one-to-many
> > column="teste'
> > class="adama.supplier.SupplierSegment"
> > */
> > public List getSegments() {
> > return segments;
> > }
> >
> >
> >
> > And got a big:
> >
> > bernatedoclet] (XDocletMain.start
> > 47 ) Executando
> > <null/>
> > [hibernatedoclet] Gerando mapeamentos do Hibernate
> > para
> > adama.supplier.Enterprise
> > [hibernatedoclet] adama.supplier.Enterprise
> > [hibernatedoclet] (TemplateEngine.invokeMethod
> > 541 ) Invoking
> > method failed:
> >
> xdoclet.modules.hibernate.HibernateTagsHandler.roleAttribute,
> > line=3 of
> > template file:
> >
> file:/yard/fluid/xdoclet/modules/hibernate/resources/hibernate-properties.xdt
> > [hibernatedoclet]
> > java.lang.reflect.InvocationTargetException
> > [hibernatedoclet] at
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >
> > Maybe a buggy version os hibernate-module? What is
> > wrong in my code?
> >
> > Thanks for help. Again. ;)
>
> do you really need @hibernate.list?
> @hibernate.bag also returns list, and does not require
> index column.
No. Can be a bag, no problem. I try a bag and a list, but this
does not
work. :(((
>
> Anyway you are missing @hibernate.collection-index
> ( column which will be used to order your list values
> )
I try to rewrite the code:
/**
* @hibernate.bag table="SegmentSupplierXref"
* @hibernate.collection-key column="supplier"
* @hibernate.collection-many-to-many column="segment"
class="adama.supplier.SupplierSegment"
*
*/
public List getSegments() {
return segments;
}
...but got the same error:
[hibernatedoclet] (XDocletMain.start 47 ) Executando
<null/>
[hibernatedoclet] Gerando mapeamentos do Hibernate para
adama.supplier.Enterprise
[hibernatedoclet] adama.supplier.Enterprise
[hibernatedoclet] (TemplateEngine.invokeMethod 541 ) Invoking
method failed:
xdoclet.modules.hibernate.HibernateTagsHandler.roleAttribute, line=3 of
template file:
file:/yard/fluid/xdoclet/modules/hibernate/resources/hibernate-properties.xdt
[hibernatedoclet] java.lang.reflect.InvocationTargetException
[hibernatedoclet] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernatedoclet] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Maybe something I forget.....
>
> and of course on the other side of realition you will
> need @hibernate.many-to-one...
The SupplierSegment object has a key like this:
/**
* Returns the primary key of SupplierSegment
*
* @hibernate.id generator-class="native"
*/
public long getOid() {
return oid;
}
This can be Many-to-Many? Sorry, I could not find specifid docs
about
this I am some confusing.....
And thanks for help.
>
> regards,
>
> =====
> ----[ Konstantin Pribluda ( ko5tik ) ]----------------
> Zu Verst�rkung meines Teams suche ich ab Sofort einen
> Softwareentwickler[In] f�r die Festanstellung.
> Arbeitsort: Mainz
> Skills: Programieren, Kentnisse in OpenSource-Bereich
> ----[ http://www.pribluda.de ]------------------------
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> -------------------------------------------------------
> This SF.net email is sponsored by Dice.com.
> Did you know that Dice has over 25,000 tech jobs available today? From
> careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
> best hiring companies. http://www.dice.com/index.epl?rel_code=104
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
--
CUL8R,[]s
Jim Bruno Goldberg
http://www.md5.com.br
-------------------------------------------------------
This SF.net email is sponsored by Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code4
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user