Hi all, Just traced down some unexpected (to me anyway) behaviour. After reading the docs I'm not sure if it's my expectations or Rose::DB::Object that's confused.
Basically I've got a one 2 many relationship, and am using add_on_save to add things. I had expected this: $o->add_foos( $foo1, $foo2 ); to be the same as: $o->add_foos( $foo1 ); $o->add_foos( $foo2 ); $o->save; but it looks like the second add_on_save() overrides the first - to get the behaviour I expect I need to do: $o->add_foos( $foo1 ); $o->save; $o->add_foos( $foo2 ); $o->save; Two questions: 1) Is my brain or Rose::DB::Object correct? 2) If the latter, why does calling $o->foos() return both $foo1 and $foo2 before I save the object? Ta, Adrian ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object