google app engine data store working strange -


I am trying to store the data after checking the mobile app, but the code always show "failure" also mobile Whether the number is in the data base or not. This failure shows but stores the data in the datastore. Please see the code here Please tell me what I'm doing wrong

  string name = request.getParameter ("name"); String email = request.getParameter ("email"); String Mobilin = Request Jupiter ("mobilino"); String password = request.getParameter ("passwd"); String position = ""; // query query = new query ("daily"); Query.addFilter ("mobileno", query.filter operator.cll, mobilino); Datastore Service Datastore = DataServiceServiceFactor.GetDetterService (); Prepared PP = DataStore.Preaper (query); Existence daily efficiency = pq.asSingleEntity (); Out.println ("Daily Impulse:" + Daily Quote); If (daily efficiency = null) {status = "failure"; Out.println (status); } And {main dailycut = KeyFactory.createKey ("dailyquizuser", "dailyquiz"); Unit daily quizzer = new unit ("daily kuza", dailykuzaizaraki); Dailyquizuser.setProperty ("name", name); Dailyquizuser.setProperty ("email", email); Daily Quizzer. Setup ("Mobilino", Mobilino); Dailyquizuser.setProperty ("password", password); DatastoreService Datastore 1 = DatastoreSechere .get DatatourService (); Datastore1.put (dailyquizuser); Out.println ("DailyKuza:" + Daily Couzizer); Status = "success"; Out.println (status); }% & Gt;    

some notes:

  1. It should check that the mobileno variable null is not (with all other necessary parameters). This explains to you that you always find a unit - null is a valid property value. The null filter will be an entity that has the null property, but will not receive inquiries for any entity with any property.

  2. The code you show creates a single parent with institutions:

      // A key of the key Key for daily quasuezer = keyfactory.createKey ("Daily Cleaner", "Daily Quiz"); // new unit with a parent unit, daily daily quizzer = new unit ("daily cook", dailyqujarjisaki);   

    So you should consider using prognostic questions while searching for 'Daily Couzizer'.

  3. addQuery (..) is deprecated instead use setQuery () .

Comments