Title: bug in CVS version
Yep, it does - I use arraylist, so I guess it is only those that have issues.
 
Perhaps I will change to collection - I don't see much benefit using the other mapping actually, since I only ever iterate and handle the order myself.
 
- Brett
-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 29 November 2001 6:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] bug in CVS version

hi brett,
 
i do not have a problem with collections in a one-to-many relationship:
 
 /**
  * Sets the konti
  * @param konti The konti to set
  */
 public void setKonti(java.util.Collection konti)
 {
  this.konti = konti;
 }
 
and the mapping :
 
    <field name="konti" type="brj.castor.Konto" required="true"
           collection="collection">
      <sql many-key="idPerson"/>
    </field>
but when i use the following mapping with 'vector' instead of 'collection' i get the same error:
 
    <field name="konti" type="brj.castor.Konto" required="true"
           collection="vector">
      <sql many-key="idPerson"/>
    </field>
 
hth
 
jakob
 
----- Original Message -----
Sent: Thursday, November 29, 2001 3:39 AM
Subject: Re: [castor-dev] bug in CVS version

It fixed the bug, but developed another one:
 
2001-11-29 13:34:49 init: org.exolab.castor.mapping.MappingException: The method set/addProducts in class au.com.f2.shopping.retailer.Retailer accepting/retur
ning object of type class au.com.f2.shopping.product.Product was not found
        at org.exolab.castor.persist.FieldMolder.<init>(FieldMolder.java:583)
        at org.exolab.castor.persist.ClassMolder.<init>(ClassMolder.java:367)
 
   /** Setter for property products.
     * @param products New value of property products.
     */
    public void setProducts(Collection products) {
        this.products = products;
    }
 
I'm having a look now to see if I can figure out what is wrong with the alternative you used that fails for collections...
 
Cheers,
Brett
-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 28 November 2001 6:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] bug in CVS version

hi brett,
 
i'm happy i'm not the only one with this bug. i've reported this one some time ago, but no feedback so far.
the problem is in the FieldMolder where the wrong class is taken to lookup the set-method. i've attached the version i use. look for BRJ in the code.
 
hth jakob
 
 
 
----- Original Message -----
Sent: Wednesday, November 28, 2001 4:02 AM
Subject: [castor-dev] bug in CVS version

I get the following error with the CVS version, but not the release 0.9.3:
2001-11-28 13:59:33 init: org.exolab.castor.mapping.MappingException: The method setEnabled in class au.com.f2.shopping.retailer.Retailer accepting/returning

object of type boolean was not found

I have defined both setEnabled and isEnabled, and use the following line in mapping:
        <field name="enabled" type="boolean" get-method="isEnabled" set-method="setEnabled">
            <sql name="enabled" type="char[01]"/>
        </field>

So who broke it? :)

Cheers,
Brett

~*~*~*~*~*~*~
Brett Porter - Web Developer
f2 Network ~ everything essential
Ph: +61 2 8596 4437
Email: [EMAIL PROTECTED]

Reply via email to