On 7/29/06 7:17 PM, Kurt Hansen wrote:
> $b1 = Basket->new(...);
> $p1 = Person->new(...);
> $b1->persons($p1);
> $b1->save();             # "I'd enter one entry"
> 
> $b2 = Basket->new(...);
> $p2 = Person->new(...);
> $b2->persons($p2);
> $b2->save();             # "I entered another entry"
> 
> This would result in the $p1 data being deleted.

Ah, because your column_map only specified Item and both $b1 and $b2 had the
same Item column value, I see.

> In both saves, a DELETE was called before the INSERT into persons. Wouldn't
> expect that, but that's probably because I didn't understand it well enough.

If you know for sure that the existing list of related items is empty, you
can try calling add_persons() instead, which should not try to delete the
existing list before adding the new items.

-John



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to