On 2/6/07, Ted Zlatanov <[EMAIL PROTECTED]> wrote:

On Tue, 6 Feb 2007 13:19:37 -0500 "John Siracusa" <[EMAIL PROTECTED]>
wrote:

JS>     my($price) = grep { $_->region eq 'UK' } $p->prices;
JS>     $price->delete;
JS>     $p->prices(undef);    # forget previously fetched collection
JS>     @prices = $p->prices; # collection no longer contains deleted
entry

What always annoyed me about this technique is that it looks like
you're losing all the prices.  Setting something to undef generally
has that meaning in Perl.  I would rather write


I have the same interpretation of the code without the accompanying
comments.
I wasn't ready to say anything until I had a better idea of how to do  it,
and I still
don't have a better idea.

$p->forget_prices();


That looks to me like  it should delete the prices as well.
How about $product->unload_prices; or
$product->unload_relationship('prices');


Clayton Scott
--
[EMAIL PROTECTED]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to