Re: Better key path creation
Re: Better key path creation
- Subject: Re: Better key path creation
- From: John Huss <email@hidden>
- Date: Tue, 21 Dec 2010 10:35:08 -0600
It tries to avoid collisions that are more likely to occur by adding "Key" to the end of the method name, but it is still possible. I think the ideal solution would be to have a function to detect a collection (in the template logic) and only rename the ones that are necessary. However, even that is problematic because then the user is likely to accidentally call the wrong method (the one we collided with).
Because of the nature of this, it might make more sense to not put it in the standard template and just let people add it to their own custom templates, that way they can handle any collisions themselves. By putting it out here like this for now people can try it and maybe report any problems and we'll see how it goes.
John
On Tue, Dec 21, 2010 at 9:41 AM, Ramsey Gurley
<email@hidden> wrote:
Does this still produce the collisions that Timo observed? If so, I know it isn't pretty, but I think the patch may stand a better chance if it has a prefix like
MovieRole.$path.$talent().$photo().$photo().key()
Otherwise, the next time someone wants to add a new method to ERXKey, the change is going to be subject to everyone getting upset because it brakes with their model. But then, I also remember Mike saying something about perm cache at some point in time...
Ramsey
_______________________________________________
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