I have 2 classes: Article and dependant class Segment. a Segment
collection is mapped to Article with <sql many-key="articleid">

without having to map the foreign key column "articleid" to a field in
Segment, castor can load an Article along with the Segment collection
just fine.  this is good.

going the other way, i wanted to be able to modify the Segment
collection of an Article, adding new Segment instances, and persist the
Article back to the database with db.update().

castor does create new Segments in the database, but doesn't write the
Article id into the foreign key column.  it seems castor should be able
to do this in the case of dependant classes.

i hunted around the mail archives, but couldn't find anything on this.
i also looked in the persistence source code, but only found dependency
checking for superclasses.

is there any way castor can perform this update successfully without
having to map the fields for foreign keys?

i'm specifically trying to avoid mapping foreign key fields so as to
decouple the java classes from the relational tables as much as
possible.

thanks,
ed hicks

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to