hang on guys, I solved the problem...

As I said before I used the
org.exolab.castor.builder.extraCollectionMethods=true
option in castorbuilder.properties so that I got extra methods i.e.
getMovieAsReference to access my internal collections as vectors.

Now, I've put the following extra attributes in the mapping.xml file:
<class name="movies.Actor" identity="id">
<field name="movie"
  type="movies.Movie"
  collection="vector"                <-- added this
  get-method="getMovieAsReference"   <-- added this
  set-method="setMovie">             <-- added this
<sql name="id_movie" many-table="actor_movie" many-key="id_actor"/>
<bind-xml name="Movie" node="element"/>
</field>
</class>

and the problem was solved. Now I can delete the persistent object Movie
with all the included collection of Actors.

Cheers!
piero

> try db.setAutoStore(true); after db.begin().
>
> greets Niko
>
> -----------------------------------------------------------
> 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

Reply via email to