On 10/12/2007, at 5:45 AM, Don Lindsay wrote:

When I use the following settings I can save and the listbox shows the correct number of rows and the correct selected items.

Great.

ToManyRelationship: WOToManyRelationship {      
        sourceEntityName = "Agents";
        destinationDisplayKey = "orgs";
        sourceObject = agent;
        relationshipKey = "mgtOfc";
}

However it is a cominbation of all fields in the orgs entity that are being displayed separated by commas and surrounded by curly braces. So I set destinationDisplayKey to orgs.description

to get a more user friendly view. I get an error that com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: valueForKey(): lookup of unknown key: 'orgs.description'.

You need to set the destination display key as the key *from* the objects found at "mgt0fc" rather than from your source object.

So that should be something like:
destinationDisplayKey = "org.description"; // i.e., it's a toOne from your join record.

with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to