Re: [appengine-java] Compare Unowned Key

2010-11-02 Thread Andy
Got it!!! http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html Thanks Max Ross, the blogger. Basically I have to use the following syntax instead of regular String builder: p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} p.p2 {ma

Re: [appengine-java] Compare Unowned Key

2010-11-02 Thread Andy
Hello, I store a KEY in a child object as foreign key kind of thing, then when I query the child, I use query with following: Query query = pm.newQuery(PField.class, "pobject == "+KeyFactory.keyToString(object)); Where PField is the child class, pobject is the KEY foreign key, but when I execu

Re: [appengine-java] Compare Unowned Key

2010-11-01 Thread Andy Leung
Because the key is an unowned foreign key. Sent from my iPhone On 2010-11-01, at 6:22 PM, "Ikai Lan (Google)" wrote: If you're searching by key, why not use KeyFactory and get the object director by key instead? It'll run faster. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogg

Re: [appengine-java] Compare Unowned Key

2010-11-01 Thread Ikai Lan (Google)
If you're searching by key, why not use KeyFactory and get the object director by key instead? It'll run faster. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine

[appengine-java] Compare Unowned Key

2010-10-31 Thread Andy
I created unowned key in child objects for query. When I try to query by the key, I tried the following because I read the GQL statement: p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} span.s1 {color: #492df6} "where product = KEY('"+KeyFactory.keyToString(product)+"')"); But it