Fetch Specifications on class method results
Fetch Specifications on class method results
- Subject: Fetch Specifications on class method results
- From: Ray Ackland <email@hidden>
- Date: Tue, 7 Oct 2003 14:58:14 +1300
Can anyone tell me if you can do display group (or otherwise) fetches
that use a calculated Boolean value? The particular case I am
interested in is to create a list of clients whose DOB is invalid. I
have a method in the class file called ageNow(), and would like to use
that to filter the records where ageNow()<0 or ageNow>100 (say).
Currently I am using a display group with a WOConditional using another
method (isDobValid()) returning a bool value based on ageNow(). The
result of this is the produced web page will have varying numbers of
clients showing (perhaps even none).
I expect any fetch spec will be converted to SQL on the original DB,
which doesn't have this derived information. I guess I can set up the
fetch to compare dates in the DB to today's date, but (out of interest)
would like to know if there is another way.
Ray.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.