Hi all, Environment: Netbean (Java)
after look through few related post. http://groups.google.com/group/google-appengine/browse_thread/thread/d8c318d052732d95/7c504af82ed3f7f2?lnk=gst&q=query+filter+null#7c504af82ed3f7f2 http://groups.google.com/group/google-appengine/browse_thread/thread/9f21aa616ba3782d/6c2229a1a4d7f05d?lnk=gst&q=query+filter+null#6c2229a1a4d7f05d http://groups.google.com/group/google-appengine/browse_thread/thread/bcd4fabe5ec8cd72/a75784bce9c18664?lnk=gst&q=query+filter+null#a75784bce9c18664 http://groups.google.com/group/google-appengine/browse_thread/thread/aa2cfd8e1bc140fa/5f7805726818452f?lnk=gst&q=query+filter+null#5f7805726818452f http://groups.google.com/group/google-appengine/browse_thread/thread/412be1e8954e7f63/b021859ab5606994?lnk=gst&q=query+null#b021859ab5606994 http://groups.google.com/group/google-appengine/browse_thread/thread/c98659a1db11787b/897c2eaefd3ef65c?lnk=gst&q=query+null#897c2eaefd3ef65c http://groups.google.com/group/google-appengine/browse_thread/thread/6e3934a7ab1fcd1/d0a22e8aa4ea5e66?lnk=gst&q=query+null#d0a22e8aa4ea5e66 http://googcloudlabs.appspot.com/codelabexercise6.html i still cannot solve my problem. what i need to achieve is query the database, to avoid duplicate record to store inside it. Some of my records have null value, so when i create a query to do checking. it creates problem. there are 2 ways to retrieve record. 1. GQL 2. Filter i'd try both but none of it give me correct result (either 0 or all record returned) ******************************************************************************************************************************************** Query query = pm.newQuery(beanProperty.class, "source == 'IProperty' && contactName == 'Kian Law' && propertyEstate == null"); List<beanProperty> listResult = (List)query.execute(); ******************************************************************************************************************************************** Query query = pm.newQuery(beanProperty.class); query.setFilter("source == paramSource && contactName == paramContactName && propertyEstate ==" + null); query.declareParameters("String paramSource"); query.declareParameters("String paramContactName"); query.declareParameters("String paramPropertyEstate"); Map args = new HashMap(); args.put("paramSource", "IProperty"); args.put("paramContactName", "Kian Law"); args.put("paramPropertyEstate", null); List<beanProperty> listResult = (List)query.executeWithMap(args); ******************************************************************************************************************************************** -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.