Hi Neil,The query looks fine to me. You probably should post this question on the JPOX.org forum as well.
Regards, Craig On Dec 16, 2006, at 12:39 PM, Neil Aggarwal wrote:
Hello: I am using JDO 2 (The JPOX implementation). I have four related persistent classes: Product - contains a qtyAvailable for the quantity we can sell Subclass - has a set of products ClassNode - has a map of String to Subclass objects Department - has a map of String to ClassNode objects. I want to get all of the products that are contained in a department, so I wrote the query below. Unfortunately, it is giving me zero results. Here is the code I am using: Query q = pm.newQuery(Product.class); q.declareImports("import persistent.*"); q.declareParameters("Department d"); q.declareVariables("ClassNode c; Subclass s; Product p");q.setFilter("d.classesMap.containsValue(c) && c.subclassMap.containsValue(s)&& s.products.contains(p) && (p.qtyAvailable>0)"); Collection result = (Collection) q.execute(dept); Did I do something wrong in my query? Thanks, Neil -- Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com FREE! Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details.
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature