Re: Returning a Related Array of Attributes?
Re: Returning a Related Array of Attributes?
- Subject: Re: Returning a Related Array of Attributes?
- From: Owen McKerrow <email@hidden>
- Date: Fri, 17 Sep 2004 10:26:53 +1000
NSArary's, takeValueForKey, will do just want you want.
So in your case :
NSArray allNames = company.takevalueForKey(employees.name);
Owen
On 17/09/2004, at 10:01 AM, James Cicenia wrote:
Hello -
I am wondering if there is a one line piece of webobjects magic that I
am missing.
Something which would return an array of strings from a relationship.
Say I have a company with employee objects. I want a new string array
of the
company's employee names.
I have been looping through the relationship
and adding the string to a mutable array and was wondering
if their was a shortcut I have not stumbled upon?
Thanks again,
James Cicenia _______________________________________________
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
'The test of a first-rate intelligence is the ability to hold two
opposed ideas in the mind at the same time and still be able to
function.'
-F.Scott Fitzgerald,
_______________________________________________
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