Query « jdo « Java Enterprise Q&A

1. Querying if an array contains an element in JDO    stackoverflow.com

I have a model that has an array of Strings called tags,

public class Model {
    private String tags[];

How do I make a ...

2. Java: JDOQL startsWith query, case sensitive    stackoverflow.com

I'm using the .startsWith() filter in a JDOQL query but it's case sensitive. So startsWith("ab") doesn't return "Abc" result and so on. Will I need to use a SQL query to avoid this ...

3. Why does JDOQL query using "matches" semantics only work with a literal?    stackoverflow.com

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 ...

4. Exception: Query result sets are not modifiable    stackoverflow.com

I'm trying to write to a JDO store using this code:

    PersistenceManager pm = PMF.get().getPersistenceManager();

    try {


5. JDOQL Subquery count problems    stackoverflow.com

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.JDOUserException: Cannot perform ...

6. With JDO, is it possible to query for all objects that implement a particular interface?    stackoverflow.com

I tried using the following query:

Query q = getPersistenceManager().newQuery(
getPersistenceManager().getExtent(ICommentItem.class, false)
but got: org.datanucleus.exceptions.NoPersistenceInformationException: The class
"com.sampleapp.data.dataobjects.ICommentItem" is required to be persistable yet no Meta -Data/Annotations can be found for this ...

7. When should I call javax.jdo.Query.close(Object)?    stackoverflow.com

I'm trying to understand when I should call Query.close(Object) or Query.closeAll(); From the docs I see that it will "close a query result" and "release all resources associated with it," ...

8. In what situations does Query.execute() return null in DataNucleus    stackoverflow.com

I have not added anything to my Database yet, thus the following query should return a result of 0 by my reckoning.

    Query query = pm.newQuery(Password.class);

9. JDO query using the object ID    stackoverflow.com

I have a User object which has a collection of Transaction objects under it. I store the object ID for my User object and now need a query to sum the transactions ...