Looks like I had this wrong the first time. Change: q.declareVariables(Company.class.getName() + " companyParam"); To: q.declareParameters(Company.class.getName() + " companyParam");
Its happier this way. On Apr 29, 2:15 pm, korey_sed <kouro...@gmail.com> wrote: > I struggled with this for a while and could not find a clear example, > so I hope it helps someone out there. > > I have a company object that has employees and employees could be > deleted (boolean property). So I wanted to search for all employees > for company X where the company is not deleted. It should be noted > that I have a bidrectional owned relationship setup between Company > and Person. > > here is how I did it in JDO: > > <code> > Key companyKey = KeyFactory.stringToKey(companyKeyString); > String queryStr = "select from " + Person.class.getName() + > " where company == companyParam && deleted == false"; > Query q = pm.newQuery(queryStr); > q.declareVariables(Company.class.getName() + " companyParam"); > persons = (List<Person>)q.execute(companyKey); > </code> > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.