About query



PersistenceManager is the primary interface for JDO-aware application components.(Interface of JDO)


possible index required for improving query performance

Hi,   I have the following entity class:   @Entity @Table @Indices({ @Index(members={"relationshipType", "party"}), @Index(members={"relationshipType", "otherParty"}),     @Index(members={"relationshipType"}) }) @XmlRootElement public class Relationship implements Comparable<Relationship> { ... ;   } With the following query: TypedQuery<BaseObject> query = em ( ) . createQuery ( "SELECT r.party ...


Large query parameter - out of memory

I have an entity object composed of an id, large data in the form of a string and the hashcode of the string as an index. The attached test saves 2000 of these objects, writing the data to a txt file as it goes. It then loops through the data from the file and queries for the entity id based on the data hashcode and the data itself. ... the test throws an out of memory exception so I assume the query data is being held internally. I've tried reducing the query-cache programs setting but this made no difference (I'm not 100% sure ...



Modify the query to restrict the query result according to the specified boolean expression.(Method of javax.persistence.criteria.CriteriaQuery)


NPE on em.createQuery(query).getResultList()

(JPA2 support getting better but still not quite there, excellent progress regardless). Difficult to see what's going on because of obfuscation, but it didn't look like this exact issue was reported yet (seemed to differ from the other reported and fixed NPEs): ... entity object with no allocated ID (before commit) as a query parameter. Please try build 2.2.8 that should fix this bug. ... ; // entity with no ID as a parameter Query query = em. createQuery ( "SELECT e FROM ...


Optimization of Map Queries

hi! I am having loads and loads of occurrences of something like ((com.test.MyEntity) $1.map.get('com.test.MyEntity')).someProperty ... ((com.test.MyEntity) $1.map.get('com.test.MyEntity')).someOtherProperty .. ((com.test.MyEntity) $1.map.get('com.test.MyEntity')).someMoreProperties I need to use full qualified names for casting as well as for the map keys because same entity simple names may occur multiple times. Now I've got two questions: ... enough to cache the map.get(..) result(s) once to not query the map again and again for each test in my query? 2) Is there anything I could do for shortening the query string? ...


ClassCastException thrown when running count query

Hello! Attached you find a full stacktrace. The query was: ... Attached you find a full stacktrace. The query was: SELECT COUNT ( t ) FROM Position t WHERE ( ... Index definition for the fields in the query. Log of the query execution using DEBUG logging level. ...



... fetch of collection elements. Fixed a bug in query plans that use an inherited index. Fixed an ... Fixed a  NullPointerException bug in query execution. Fixed a bug in using non managed non ...


Performance issues on aggregate query

we are using this aggregate query to collect some data: ... we are using this aggregate query to collect some data: select ... No the problem is the following: when we query objects that have no objects linked into the relationship ObjectNode.childNodes the query takes around 1 second. when we query objects that have typically ...


setHint(hintName, value)

Set a query property or hint.(Method of javax.persistence.Query)