Borries,
I think you should put "collection" in the mapping instead of vector for your case. Thomas ><field name="keywords" type="com.debis.urlAdmin.dm.Keyword" lazy="true" >direct="true" collection="collection"> -----Original Message----- >From: Matthew Baird [mailto:[EMAIL PROTECTED]] >Sent: Thursday, November 08, 2001 12:55 PM >To: [EMAIL PROTECTED] >Subject: Re: [castor-dev] MappingException > >if this is CVS version, you are outta luck, the whole thing seems to be >borked. I'm waiting for a message from thomas to fix it. You can try to use >collection="collection" but if you use get-method or set-method it's >wrecked. > >-----Original Message----- >From: B�rries Ludwig [mailto:[EMAIL PROTECTED]] >Sent: Thursday, November 08, 2001 12:45 PM >To: [EMAIL PROTECTED] >Subject: [castor-dev] MappingException > > >Hi, > >my many-to-many-test does not work. I get following exception: > >org.exolab.castor.jdo.DatabaseNotFoundException: Nested error: >org.exolab.castor.mapping.MappingException: The field public >java.util.Collection com.debis.urlAdmin.dm.Url.keywords is not of the >specified type java.util.Vector > >Url is declared as follows: > >public class Url { > private String url = null; > public String uid = null; > public Collection keywords = new Vector();} > >The mapping.xml is: > ><!-- n:m-relationship to Keywords --> > <field name="keywords" type="com.debis.urlAdmin.dm.Keyword" lazy="true" >direct="true" collection="vector"> > <sql many-table="keywordurl" many-key="Url" name="keyword"/> > </field> > >When I change "Collection keywords= new Vector()" to "Vector keywords= new >Vector()", then I got a class cast exception, that RelationCollection cannot >be a Vector. > >Help is very welcome. > >Boerries > >----------------------------------------------------------- >If you wish to unsubscribe from this mailing, send mail to >[EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > >----------------------------------------------------------- >If you wish to unsubscribe from this mailing, send mail to >[EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
