Searches via might-have
[prev]
[thread]
[next]
[Date index for 2004/06/15]
Suppose I have table of items of food in stock at my shop, modelled by
MyApp::Food. For complex reasons, the food table relates to a separate
table, "date" (Myapp::Date), which contains sell_by, best_before and use_by.
Each Food object can only have one Date object, so we use might_have to
import the columns into Food:
MyApp::Food->might_have(best_before_date => MyApp::Date => "best_before");
...
What I'd now like to do is call something on MyApp::Food (preferably) to
search for best before dates between X and Y. Is this possible, or do
I have to do the search on MyApp::Date and map them back to ->food?
--
DISCLAIMER:
Use of this advanced computing technology does not imply an endorsement
of Western industrial civilization.
|
Searches via might-have
Simon Cozens 10:24 on 15 Jun 2004
|