Re: Better key path creation

2011-01-06 Thread Jean-Francois Veillette
I just read the referenced mail thread. It seem very interesting ! Mike S. have real concern which are potential problem for specific cases. Is it possible to have an option in the template to generate (or not) the extra classes and new keypath support ? The option for extra keypath support coul

Re: Better key path creation

2011-01-05 Thread Marc Guenther
How interesting. I almost missed this. I posted something similar a while ago (http://www.mail-archive.com/webobjects-dev@lists.apple.com/msg37440.html ). Unfortunately it didn't generate much interest. I wonder if people just don't know what they are missing out on. Come on people, this stu

Re: Better key path creation

2010-12-21 Thread John Huss
On Tue, Dec 21, 2010 at 2:07 PM, Ramsey Gurley wrote: > > On Dec 21, 2010, at 2:52 PM, John Huss wrote: > > I don't think that will work, will it? It has to call a method. > > > I think you're right. Vars look like they will eat a lot of memory on > second glance. > > One solution that would wor

Re: Better key path creation

2010-12-21 Thread Mike Schrag
this is why i didn't go down this path originally ... i think you can reuse instances if you write the templates carefully (the key instance returned from a relationship can be the same as the key instances of the destination entity), but it just made me nervous about the amount of "stuff" it wa

Re: Better key path creation

2010-12-21 Thread Ramsey Gurley
On Dec 21, 2010, at 2:52 PM, John Huss wrote: I don't think that will work, will it? It has to call a method. I think you're right. Vars look like they will eat a lot of memory on second glance. One solution that would work very well would be to refactor ERXKey and create a base clas

Re: Better key path creation

2010-12-21 Thread Ramsey Gurley
Thinking out loud... It would be interesting to see how much memory the vars approach uses... Not only does each EO get an instance, but each relationship gets a new instance of the ERXKey subclass too... which in turn has its own relationships and new instances. It's certainly easier to

Re: Better key path creation

2010-12-21 Thread John Huss
I don't think that will work, will it? It has to call a method. One solution that would work very well would be to refactor ERXKey and create a base class that has a much smaller API that is non-conflicting, then the ERXKey subclasses could use that instead. John On Tue, Dec 21, 2010 at 12:03 P

Re: Better key path creation

2010-12-21 Thread Ramsey Gurley
I wonder if we can work in atKey support... Ramsey On Dec 21, 2010, at 2:28 PM, Ramsey Gurley wrote: Awesome. I like that best. Ramsey On Dec 21, 2010, at 1:03 PM, Timo Hoepfner wrote: Or we use vars instead of methods: MovieRole.pathTo.talent.photo.photo.key() Adding a patch in a minute

Re: Better key path creation

2010-12-21 Thread Ramsey Gurley
Awesome. I like that best. Ramsey On Dec 21, 2010, at 1:03 PM, Timo Hoepfner wrote: Or we use vars instead of methods: MovieRole.pathTo.talent.photo.photo.key() Adding a patch in a minute... Timo Am 21.12.2010 um 18:32 schrieb Timo Hoepfner: Does this still produce the collisions that Ti

Re: Better key path creation

2010-12-21 Thread David Avendasora
On Dec 21, 2010, at 12:32 PM, Timo Hoepfner wrote: > I like it. Didn't know $ would be allowed within a var name. Looks like € > would also be allowed. Oh great. Now I have to localize my source code?! Maybe I'll just use £ so my code is worth more. I mean really, $ could be Canadian or Austr

Re: Better key path creation

2010-12-21 Thread Ricardo J. Parada
Oh I like that better. :-) By the way the patch references the "EOGenericRecord" string constant. I think it should be ${EOGenericRecord}. Isn't that what the rest of the _WonderEntity.java template uses. On Dec 21, 2010, at 1:03 PM, Timo Hoepfner wrote: > Or we use vars instead of methods

Re: Better key path creation

2010-12-21 Thread Timo Hoepfner
Or we use vars instead of methods: MovieRole.pathTo.talent.photo.photo.key() Adding a patch in a minute... Timo Am 21.12.2010 um 18:32 schrieb Timo Hoepfner: 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

Re: Better key path creation

2010-12-21 Thread Timo Hoepfner
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 chan

Re: Better key path creation

2010-12-21 Thread John Huss
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

Re: Better key path creation

2010-12-21 Thread Ramsey Gurley
On Dec 20, 2010, at 10:15 AM, John Huss wrote: The WOLips one is the real one. You can go vote for it if you'd like to have it. Thanks, John On Mon, Dec 20, 2010 at 5:30 AM, Timo Hoepfner d...@onlinehome.de> wrote: Already there... http://issues.objectstyle.org/jira/browse/WONDER-617 htt

Re: Better key path creation

2010-12-20 Thread John Huss
The WOLips one is the real one. You can go vote for it if you'd like to have it. Thanks, John On Mon, Dec 20, 2010 at 5:30 AM, Timo Hoepfner wrote: > Already there... > > http://issues.objectstyle.org/jira/browse/WONDER-617 > http://issues.o

Re: Better key path creation

2010-12-20 Thread Timo Hoepfner
Already there... http://issues.objectstyle.org/jira/browse/WONDER-617 http://issues.objectstyle.org/jira/browse/WOL-1189 Timo Am 20.12.2010 um 12:21 schrieb David Avendasora: Hi John, These look brilliant! It would be great if you added this to the Wiki page for EOGenerator templates & ad

Re: Better key path creation

2010-12-20 Thread David Avendasora
Hi John, These look brilliant! It would be great if you added this to the Wiki page for EOGenerator templates & additions: http://wiki.objectstyle.org/confluence/display/WOL/EOGenerator+Templates+and+Additions I think this is cool enough that you should put together a patch for Wonder! Dave

Re: Better key path creation

2010-12-18 Thread ISHIMOTO Ken
Great, Thanks looks nice. On 2010/12/17, at 23:00, Ricardo J. Parada wrote: > > Oh just when I think I'm building qualifiers in the coolest possible manner. > :-) :-) > > Thanks for sharing... > > > On Dec 17, 2010, at 3:54 PM, John Huss wrote: > >> If anyone is interested, I recently cam

Re: Better key path creation

2010-12-17 Thread Ricardo J. Parada
Oh just when I think I'm building qualifiers in the coolest possible manner. :-) :-) Thanks for sharing... On Dec 17, 2010, at 3:54 PM, John Huss wrote: > If anyone is interested, I recently came up with an EO template enhancement > that allows for much better keypath creation using ERXKey

Better key path creation

2010-12-17 Thread John Huss
If anyone is interested, I recently came up with an EO template enhancement that allows for much better keypath creation using ERXKeys. It works by creating an inner class in each eo class that exposes methods for appending each of it's keys to a key path that is being built. Then you can construc