Re: Need help building an EOQualifier with session values
Re: Need help building an EOQualifier with session values
- Subject: Re: Need help building an EOQualifier with session values
- From: Zak Burke <email@hidden>
- Date: Mon, 22 May 2006 15:33:23 -0400
Chuck Hill wrote on 5/21/06 11:44 AM:
>> NSArray bindings = new NSArray( new Object [] {
>> (Session)session().valueForKey("user.client.clientName") } );
>>
> valueForKeyPath not valueForKey
I've been bitten by this one too.
Is there ever a reason to use valueForKey instead of valueForKeyPath? (I
ask this question along the same vein as, "Is the simplicity of always
using addObjectToBothSidesOfRelationshipWithKey worth the potential
performance hit compared to addObjectToPropertyWithKey?")
The NSKeyValueCodingAdditions documentation doesn't allude to any
performance hits, and says its basically implemented in terms of value
for key. Is valueForKey faster? I supposed it would be because it won't
even try to access items along the keypath; it'll just die right away.
As an aside, is it possible for an item to have a valid key containing a
dot? Don't keys eventually map to object properties that have to conform
to java variable names?
zak.
_______________________________________________
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