Good day everyone!
I 'm pretty new to Appengine, and trying solve a GQL problem for days. the query.fetch works fine locally, but parsererror on the real server. first I have a mail class * class Mail(db.Model):* and i store the mail address this way * mail = Mail( key_name = mail_addr )* * mail.put()* then the 2nd class * class User(db.Model):* * user_name = db.StringProperty()* and I store the data like this * user = User( key_name = id, user_name = name )* * user.put()* then a many to many class * class userMail(db.Model):* * user = db.ReferenceProperty(User)* * mail = db.ReferenceProperty(Mail)* and then this is how I add a new entry * user_mail = userMail( user = user_ref, mail = mail_ref )* * user_mail.put()* when I try to fetch the data... * query = db.GqlQuery( 'SELECT * FROM userMail WHERE user = :1', user_ref )* * return query.fetch(None)* this works. and when I try * query = db.GqlQuery( 'SELECT * FROM userMail WHERE user != :1 AND mail = :2', user_ref, mail_ref )* or * query = db.GqlQuery( 'SELECT * FROM userMail WHERE user != :1 AND mail = :2', user_ref.key(), mail_ref.key() )* * Log.add( "query created" )* * rslt = query.fetch(1)* * Log.add( "got the result!" )* "query created" is logged but "got the result!" failed. and I always got a "parsererror" when I try calling it using ajax... something went wrong during the fetching. I've read a post http://stackoverflow.com/questions/2277739/whats-the-raw-gql-to-check-a-referenceproperty and it seems so easy... Best, Hiro -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
