[appengine-java] Re: Querying child objects based on parent key

2010-04-30 Thread korey_sed
Sorry for all the posts, but wow...so many restrictions. So it also seems like this only works if there is no subclassing. meaning that if you are quering on a class whose parent property is in its super class, then this does not work and throws and null pointer exception. This just looks wrong d

[appengine-java] Re: Querying child objects based on parent key

2010-04-30 Thread korey_sed
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 wrote: > I struggled with this for a while and could not fin

Re: [appengine-java] Re: Querying child objects based on parent key

2010-04-30 Thread Chau Huynh
I think korey_sed wanted to share knowledge base on his hand on experience, his example should work... The point in his example is querying with key, whether it's in child on parent or child class http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html Obviously loading

[appengine-java] Re: Querying child objects based on parent key

2010-04-30 Thread ailinykh
JDO is a thin layer which gives you some kind of automation and restriction. But it exists only an run time. I mean you have to instantiate objects first. In other words Company c = getCompany(); for(Person p:c.getPersons()){ if(p.isDeleted()) continue; //do what ever you want to do }