jdoql

What does ":P" mean in a JDO query

I am using JDO on google app engine. Each 'Employee' has a 'key'. I have a set of keys and wanted to retrieve all Employees whose key belongs to this set. So I implemented it using the 'contains()' filter as specified here. The code works fine and looks like this - List<Key> keys = getLookupKeys(....) ..//Get keys from somewhere. Quer...

How to query for an interface and filter the resultset with JDOQL?

Hi, I have an interface @PersistenceCapable public interface MyInterface { public abstract String getName(); public abstract void setName(String name); } The persistence layer uses JDO. The JDO implementation is DataNucleus. Now I want to query for any instances of that interface with JDOQL. Query query = getPersistence...

Problem with JDOQL to obtain results with a "contains" request

Hi, I am using Google App Engine for a project and I need to do some queries on the database. I use the JDOQL to ask the database. In my case I want to obtain the university that contains the substring "array". I think my query has a mistake because it returns the name of universities in the alphabetical order and not the ones containin...

Why does JDOQL query using "matches" semantics only work with a literal?

I'm trying to construct a JDOQL query (using datanucleus) that will search for matches of a parent class based on criteria in an owned one-to-many child class. The query looks like this: Query lQ = lPm.newQuery("select from "+Module.class.getName()+ " where moduleMappings.contains(m)" + " && showNameParam.ma...

Rounding a value in JDOQL

I've got data in the GAE data store. I want to write a JDOQL against that data that takes one of the columns and rounds the value of it. Can I do this? ...

Using the 'INTO' keyword in JDOQL with GAE

I have a persistent class, 'Meeting' that has a 'minute' and 'hour' field among others. I only need these two fields to populate a dropdown in my ui. The example I found tells me that I can create a simple bean that would house just these two fields but I'm getting an error saying that it can't convert an Integer to a MyTime object. It's...

What is the best way to get multiple objects using a List of Keys on Google App Engine (Java)?

I have a many-to-many relationship. Just like in the example from the documentation: Person.java private Set<Key> favoriteFoods; Food.java private Set<Key> foodFans; How do I get all "favorite foods" of a certain "food fan", if i have retrieved a "Person" object and i have the favoriteFoods key set. Is there a better way than...

JDOQL Subquery count problems

I am having trouble with subquery counts with JDOQL (using DataNucleus). The following query SELECT this.price FROM com.mysema.query.jdo.test.domain.Product WHERE (SELECT count(other) FROM com.mysema.query.jdo.test.domain.Product other WHERE other.price > this.price) > a1 PARAMETERS java.lang.Long a1 causes the Exception javax.jdo.JD...