2009年2月3日星期二

[fw-mvc] ManyToMany Association Question

What's the best way to qualify the results for a ManyToMany association?

For example, in the following code, instead of returning all of the
places reviewed by Rob Allen, how would I get a list of all of the
places Rob Allen has reviewed within a specific country (ie. where
country = "France")?

$users = New Users();
$places = new Places();
$reviews = new Reviews();

$robAllen = $users->fetchRow('id = 1');
$placesReviewedByRobAllen = $robAllen->findPlacesViaReviews();


ps. this source code is from page 124 of Zend Framework In Action, if
that helps.

没有评论: