Qualifier With Primary Key

2011-08-18 Thread Kevin Hinkson
Hi, Since the best practice is to not make primary keys class properties, how do I then create a qualifier that is based on the primary key of an EO? Simple Eg: A blog site has nice, short bookmark-able URLs like http://website.com/blog?id=5 where 5 is the primary key. When the user hits that

Re: Qualifier With Primary Key

2011-08-18 Thread Michael Kondratov
Use EOUtilities.faultWith. method. Michael Sent from my iPad On Aug 18, 2011, at 9:35, Kevin Hinkson h...@kevinhinkson.com wrote: Hi, Since the best practice is to not make primary keys class properties, how do I then create a qualifier that is based on the primary key of an EO?

Re: Qualifier With Primary Key

2011-08-18 Thread Pascal Robert
Le 2011-08-18 à 09:35, Kevin Hinkson a écrit : Hi, Since the best practice is to not make primary keys class properties, how do I then create a qualifier that is based on the primary key of an EO? Simple Eg: A blog site has nice, short bookmark-able URLs like

Re: Qualifier With Primary Key

2011-08-18 Thread Kevin Hinkson
I'm not answering your question, but your URL should be /blog/title-of-post instead of using primary keys, to have even nicer URLs and better rank on Google. Are you using DirectActions or ERRest's HTML routing? Direct Actions. The example is just really an example though. There are

Re: Qualifier With Primary Key

2011-08-18 Thread Pascal Robert
Le 2011-08-18 à 09:47, Kevin Hinkson a écrit : I'm not answering your question, but your URL should be /blog/title-of-post instead of using primary keys, to have even nicer URLs and better rank on Google. Are you using DirectActions or ERRest's HTML routing? Direct Actions. The

Re: Qualifier With Primary Key

2011-08-18 Thread Kevin Hinkson
On 18 Aug 2011, at 09:54, Pascal Robert wrote: Le 2011-08-18 à 09:47, Kevin Hinkson a écrit : I'm not answering your question, but your URL should be /blog/title-of-post instead of using primary keys, to have even nicer URLs and better rank on Google. Are you using DirectActions or

Re: Qualifier With Primary Key

2011-08-18 Thread Johnny Miller
EOUtilities.objectWithPrimaryKey http://www.webobjects.me/API/wo542/com/webobjects/eoaccess/EOUtilities.html#objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,%20java.lang.String,%20com.webobjects.foundation.NSDictionary) re: title. If you really want to trick out Google add an

Simple JSON example

2011-08-18 Thread Calven Eggert
Hi, All I'm to write a java app to read data from a url that is JSON encoded. I'll then parse the data and create records in an Oracle database using WO. I've read that there are two ways of doing this, using either the AJAX or ERREST framework. I've managed to get this call working via AJAX

Re: Qualifier With Primary Key

2011-08-18 Thread Paul Hoadley
On 18/08/2011, at 11:05 PM, Kevin Hinkson wrote: Since the best practice is to not make primary keys class properties, how do I then create a qualifier that is based on the primary key of an EO? My suggestion would be that you don't. Calling it a best practice isn't an arbitrary

Re: Qualifier With Primary Key

2011-08-18 Thread David Avendasora
Paul is right, as far as I'm concerned. But, be really, really, really, really, really (really, really) sure you Need™ to expose it. Do everything you can to avoid it. If you only occasionally (in code) need to get an object by it's PK, then use the EOUtilities.faultWithPrimaryKey

Re: Qualifier With Primary Key

2011-08-18 Thread Jesse Tayler
Plus 1. If your business logic does not require using keys as logic then you likely want a generated unique id alongside your key. There's a lot of reasons but some are that relational database keys have complicated, even obtuse logic that can vary between database and even versions. As

Re: Conditional relation solved

2011-08-18 Thread David Avendasora
Hi Frank, Sometimes doing what your doing is the only way to do meet the requirements... BUT What Jesse said is right 99% of the time. This sounds more appropriate for the Controller level of MVC, not the Model classes. What if you have an application that uses the same Model but it doesn't

Re: Qualifier With Primary Key

2011-08-18 Thread Paul Hoadley
Just to clarify slightly, I happen to agree with Dave and Jesse, but that's almost incidental to your original post. When I wrote this: On 19/08/2011, at 9:37 AM, Paul Hoadley wrote: On 18/08/2011, at 11:05 PM, Kevin Hinkson wrote: Since the best practice is to not make primary keys class

Re: Bundle Name Problem solved

2011-08-18 Thread Jeff Schmitz
Looks like it didn't like where my wonder source code projects were. When I re-created them with the new github repository in a new place, and then re-imported them into my project, the problem cleared up. One of the directories in the path did have a space in it which I eliminated when I

Re: Simple JSON example

2011-08-18 Thread George Domurot
Hi Calven, If you have a hook to pull down a JSON object, use a package to process this data into the appropriate object/array: http://json.org/ Then, you can easily parse the data and push it into your database. -G On Aug 18, 2011, at 1:06 PM, Calven Eggert wrote: Hi, All I'm