Re: typesafe and chainable keypaths (was: Re: EOSortOrdering and keypaths [SOLVED])

2010-06-21 Thread Marc Guenther
On 21.06.2010, at 22:48, Mike Schrag wrote: >> Good point. I'd like to see this in Wonder. Anything that makes the code >> shorter and easier to read is a good thing. > "Booking.PERFORMANCE.PERFORMANCE_TYPE().NAME().valueInObject(myBooking)" > I don't see how you can do this without generating

Re: typesafe and chainable keypaths (was: Re: EOSortOrdering and keypaths [SOLVED])

2010-06-21 Thread Mike Schrag
> Good point. I'd like to see this in Wonder. Anything that makes the code > shorter and easier to read is a good thing. "Booking.PERFORMANCE.PERFORMANCE_TYPE().NAME().valueInObject(myBooking)" I don't see how you can do this without generating an ERXKey subclass for every type in the reachable

Re: typesafe and chainable keypaths (was: Re: EOSortOrdering and keypaths [SOLVED])

2010-06-21 Thread Chuck Hill
On Jun 21, 2010, at 1:40 PM, Marc Guenther wrote: > On 21.06.2010, at 18:46, Chuck Hill wrote: >> On Jun 21, 2010, at 8:39 AM, Marc Guenther wrote: >>> Hi, >>> >>> On 20.06.2010, at 18:47, Andrew R. Kinnie wrote: >>> [...] So now I have Booking.PERFORMANCE_KEY + "." + Performance.PER

Re: typesafe and chainable keypaths (was: Re: EOSortOrdering and keypaths [SOLVED])

2010-06-21 Thread Marc Guenther
On 21.06.2010, at 18:46, Chuck Hill wrote: > On Jun 21, 2010, at 8:39 AM, Marc Guenther wrote: >> Hi, >> >> On 20.06.2010, at 18:47, Andrew R. Kinnie wrote: >> >>> [...] So now I have Booking.PERFORMANCE_KEY + "." + >>> Performance.PERFORMANCE_TYPE_KEY + "." + PerformanceType.NAME_KEY >> >> Las

Re: typesafe and chainable keypaths (was: Re: EOSortOrdering and keypaths [SOLVED])

2010-06-21 Thread Chuck Hill
On Jun 21, 2010, at 8:39 AM, Marc Guenther wrote: > Hi, > > On 20.06.2010, at 18:47, Andrew R. Kinnie wrote: > >> [...] So now I have Booking.PERFORMANCE_KEY + "." + >> Performance.PERFORMANCE_TYPE_KEY + "." + PerformanceType.NAME_KEY > > Last year I cobbled together a little extension to the

typesafe and chainable keypaths (was: Re: EOSortOrdering and keypaths [SOLVED])

2010-06-21 Thread Marc Guenther
Hi, On 20.06.2010, at 18:47, Andrew R. Kinnie wrote: [...] So now I have Booking.PERFORMANCE_KEY + "." + Performance.PERFORMANCE_TYPE_KEY + "." + PerformanceType.NAME_KEY Last year I cobbled together a little extension to the ERXKey stuff, which allows you to create ERXKey paths like this:

Re: EOSortOrdering and keypaths [SOLVED]

2010-06-21 Thread Andrew R. Kinnie
This is what I was originally trying to do, using the ERXKey stuff, rather than hardcoding strings, but the ERXKey method I was using didn't work, so it seemed I was doing something more wrong than I thought. Thanks for showing me the light. :-) On Jun 21, 2010, at 7:42 AM, Chuck and Travis

Re: EOSortOrdering and keypaths [SOLVED]

2010-06-20 Thread Chuck Hill
Or ERXQ.keyPath(Booking.PERFORMANCE, Performance.PERFORMANCE_TYPE, PerformanceType.NAME) On Jun 20, 2010, at 7:29 PM, Travis Britt wrote: > Or > Booking.PERFORMANCE.dot(Performance.PERFORMANCE_TYPE).dot(PerformanceType.NAME).key() > > tb > > On Jun 20, 2010, at 12:47 PM, Andrew R. Kinnie wr

Re: EOSortOrdering and keypaths [SOLVED]

2010-06-20 Thread Travis Britt
Or Booking.PERFORMANCE.dot(Performance.PERFORMANCE_TYPE).dot(PerformanceType.NAME).key() tb On Jun 20, 2010, at 12:47 PM, Andrew R. Kinnie wrote: > Wow, you guys didn't even give me time to heat up some nachos for lunch. I > figured it was blindingly obvious, and I figured that would be the k

Re: EOSortOrdering and keypaths [SOLVED]

2010-06-20 Thread Andrew R. Kinnie
Wow, you guys didn't even give me time to heat up some nachos for lunch. I figured it was blindingly obvious, and I figured that would be the key path, my problem seems to have been that I was creating this in a static method on my Booking class for its default sort ordering . . . and I was con

Re: EOSortOrdering and keypaths

2010-06-20 Thread Chuck Hill
On Jun 20, 2010, at 9:24 AM, Andrew R. Kinnie wrote: > Greetings: > > I am drawing a blank here, and am trying to think of how to create an > EOSortOrdering across a key path. > > I have an entity Booking which has one date and one Performance. Performance > is an entity which has one Perf

EOSortOrdering and keypaths

2010-06-20 Thread Andrew R. Kinnie
Greetings: I am drawing a blank here, and am trying to think of how to create an EOSortOrdering across a key path. I have an entity Booking which has one date and one Performance. Performance is an entity which has one PerformanceType. PerformanceType is an entity which has a name attribut