Re: Filtered to many relationship
Re: Filtered to many relationship
- Subject: Re: Filtered to many relationship
- From: Don Lindsay <email@hidden>
- Date: Fri, 2 May 2008 01:48:57 -0400
For one application I wrote I extended the WOToOneRelationship and
WOToManyRelationship components and added a qualifier binding. I can
try and find the code that I used. It was convenient because you
could type it right in the binding for the relationship component.
Don
On May 2, 2008, at 12:10 AM, Chuck Hill wrote:
On May 1, 2008, at 7:31 PM, Steve Peery wrote:
I am trying to set up a to many relationship in Entity Modeler that
filters
the destination objects based on a variable in the destination
object.
For example, in my School object I have an array of Student objects
some
have a variable that defines them as fulltime. Now in my School
object I
want to create a to many relationship that just contains the
Student objects
that are fulltime. How is this done?
It is not. At least not without some rather clever work in your EO
class. The "normal" way to do this is to add a method to your EO
class, something like this:
public NSArray fulltimeStudents() {
return EOQualifier. filteredArrayWithQualifier(students(), <your
full-time student qualifier here>);
}
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@mac.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden