Re: Opinion on ERXKey type parameterization
Re: Opinion on ERXKey type parameterization
- Subject: Re: Opinion on ERXKey type parameterization
- From: Paul Hoadley <email@hidden>
- Date: Thu, 30 Mar 2017 10:10:41 +1030
On 29 Mar 2017, at 09:19, Paul Hoadley <email@hidden> wrote:
> Anyone else got any thoughts on all this?
I see it was discussed on the old Wonder list back in 2009. Dave Avendasora asked the exact question I asked:
> Since this is a to-many relationship shouldn't it be "ERXKey<NSArray<ScheduledRoutingRelationship>>"?
And Mike Schrag answered:
> no it just doesn't really work this way ... if it did this, it's easy to extend it to add the array, but it's impossible to deconstruct it to get the inner type. there are methods to extend keys, etc with array variants for most operations, but you rarely actually want the type of the key to be NSArray<T>
Along with Samuel’s observations, seems like case closed. It does still seem to leave ERXGenericRecord.valueForKey(ERXKey<T> key) broken in the case of to-many relationship ERXKeys, though, doesn’t it? (Worse, it will break at runtime.)
--
Paul Hoadley
http://logicsquad.net/
_______________________________________________
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