Is there a way to reset the data cached from relationship queries? If I have something like: my $p = Product->new(name => "Kite")->load(); for my $price ( $p->prices() ) { print "price: ", $price->price, "[", $price->region, "]\n"; }
Which prints: price: 7.79[DE] price: 1.11[JP] The in the same code do: my $price = Price->new( product_id => $p->id, region => "DE" )->load; $price->price($price->price - 0.01); $price->save; print "Price: ", $price->price, "\n"; It prints: Price: 7.78 Then if I do the prices for loop again: for my $price ( $p->prices() ) { print "price: ", $price->price, "[", $price->region, "]\n"; } I get the original data back: price: 7.79[DE] price: 1.11[JP] The prices data is cached in $p->{prices} from the first fetch. But I could not find a way to expire this cache easily, perhaps I have just overlooked something. I looked into things like: Price->meta->clear_object_cache; Product->meta->clear_object_cache; But that seems to only be fore Rose::DB::Object::Cached based objects, which these arent. Any ideas? Thanks! -Cory ------------------------------------------------------------------------- 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