On Thu, 8 Jan 2004 [EMAIL PROTECTED] wrote:
> Hello,
>
> > public class ProductTO implements java.io.Serializable {
> >
> > protected int id;
> > protected String name;
> > protected Vector symbols;
>
> 'Vector' is not a good idea. You should use an interface
> type such as Collection or List for the type declaration ...
>
> > getters and setters...
>
> ... and also for the parameter and return types.
>
> > My problem is that I get an exception when I mark it as a proxy:
> >
> > [PersistentField] ERROR: while set field:
> > object class[ com.ines.flanco.model.ProductTO
> > target field: symbols
> > target field type: class java.util.Vector
> > object value class: org.apache.ojb.broker.accesslayer.ListProxy
>
> This is a good error message, isn't it?
> The proxy is of type ListProxy, which implements the List interface
> but is not assignable to a field of type Vector.
Indeed, it seemd to work, thanks.
I see here http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html
that Vector implements the List interface, and I used Vector because it's
in the ojb documentation:
"The association is implemented by the Vector attribute allArticlesInGroup
on the ProductGroup class."
http://db.apache.org/ojb/tutorial3.html#Using%20a%20Single%20Proxy%20for%20a%20Whole%20Collection
>
>
> HTH,
> Olli
> --
> Oliver Matz
> ppi Media GmbH
> Deliusstra�e 10
> D-24114 Kiel
> phone +49 (0) 43 1-53 53-422
> fax +49 (0) 43 1-53 53-2 22
> email mailto:[EMAIL PROTECTED]
> web www.ppi.de
>
> Explore your printnet!
>
> DRUPA 2004
> D�sseldorf, Germany, 6 - 19 May 2004, Booth 6E62
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]