Re: Using a text formatter on a WOBuilder WOString object
Re: Using a text formatter on a WOBuilder WOString object
- Subject: Re: Using a text formatter on a WOBuilder WOString object
- From: Chuck Hill <email@hidden>
- Date: Tue, 17 Jun 2003 18:36:33 -0700
Do you mean that your toMany is guaranteed to return only 0 or one objects?
If so, why not make a cover method to return that one object?
public Berth berth()
{
return berths().count() > 0 ? berths().lastObject() : null;
}
That should avoid the whole keypath result wierdness and is more "correct"
than a formatter to strip off ("...").
Chuck
At 06:25 PM 17/06/2003 -0700, Nat Fast wrote:
>> Unless I have misunderstood, the problem is that a to-many
>> relationship is
>> being inlcuded in a keypath whenn a single object resultis wanted.
>> Calling
>> valueForKey on an NSArray yields an NSArray.
>>
>>
>Chuck is correct. The repetition is iterating over rootRec. The to many
>relationship is in the middle of an extensive keypath that leads to a
>string object.
>
>It returns the correct value, just in the wrong format for display.
>While it may be "proper" to reform the database to alleviate this
>issue, it would remove the normalcy of data I have been pushing towards
>in that I would have to duplicate the values in the higher order object
>A. EO Modler will not allow me to create a one-to-one for the class in
>that the primary key is different.
>
>So unless there is some great wisdom out there, I guess I am in Kludge
>land. So how do those formatters work?
>
>Nat
>_______________________________________________
>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.
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.