When I define a relationship in my (mythical) Product class called 'prices' (as
per the Tutorial), I get all kinds of magic methods for free. So in addition to
the usual:
$product->delete;
$product->save;
I can also do:
$product->prices($price_id); # replace all prices with $price_id
$product->add_prices($price_id); # add $price_id to existing related rows
But I don't get this magical method:
$product->delete_prices($price_id);
which would be equivalent to:
sub delete_prices
{
my $self = shift; # Product
my $price_id = shift;
my @keep = grep { $_->id ne $price_id } $self->prices;
$self->prices(@keep);
}
Maybe I'm missing some (obvious) item in the (otherwise exhaustive)
documentation about this? I was looking specifically for a list of all the
default method names created when a relationship is defined between two RDBO
classes. I searched the RDBO Tutorial, RDBO, RDBO Manager, RDBO Relationship::*
pods, all to no avail. If a list is there somewhere, it was hard for me to find.
TIA,
pek
--
Peter Karman . http://peknet.com/ . [EMAIL PROTECTED]
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object