About COUNT

release

2.7.2

... Fixed a memory leak (Negative snapshot user count) in UPDATE queries on uncommitted changes ( issue #224 ). ... optional. Fixed the "Negative snapshot user count" bug ( issue #83 ). Fixed a page cache purge deadlock ( ...

 
manual

[ODB1] Chapter 7 - JDOQL Queries

Explains how to use JDOQL, the Java/JDO Query Language.... be obtained using the size() method: int count = result. size ( ) ; Iteration over the ...

 
forum_thread

Getting sales quantity per country with a query, an idea anyone?

Hi, For the purpose of some charts on a dashboard for our ERP i would like to get the list of countries and the sales quantity for each of them. I am pretty sure it is somehow possible to get that directly from a more or less complex query but i failed to find it; Does any have an idea? The entity (we call it OrderData) contains fields and other entities related to an order, fields we are interrested in are  buyerCountry and orderPrice. ... + "COUNT(ord)," ...

 
forum_thread

Should derived fields of an EmbeddedId be manually maintained by app code?

If I have an Entity which has a primary key which is derived and I am implementing it using @EmbeddedId, am I responsible for maintaining the derived fields of the @EmbeddedId? I could not find anything in the JPA 2.0 spec http://download.oracle.com/auth/otn-pub/jcp/persistence-2.0-fr-oth-JSpec/persistence-2_0-final-spec.pdf?e=1317047713&h=54831c176e81a244a4c309e13eba0b27 which tells me what to expect. ... name = "numberOfMapItems" , query = "SELECT COUNT(x) FROM ECompoundKeyMapItem x WHERE x.container = :container" ) ...

 
release

2.3.7

... optional. Fixed the "Negative snapshot user count" bug ( issue #83 ). Fixed a page cache purge deadlock ( ...

 
forum_thread

Sorting problem

Hi, I was rewriting our DAO to support pagging in large dataset and I think I have found a problem with sorting. I send you a test case - sorry for using the same project as previous, but it was faster to write this test case. As usual, you can load data with DataLoader and then check problem with QueryData. There is a simple query with "order by" sentence: ... list ( int start, int count, String sortColumn, boolean isAscending ) I have ...

 
forum_thread

Grouping by date()

Hi, For some time now we can use date and time function in queries to extract part of date time (from documentation): YEAR({d '2011-12-31'}) is evaluated to 2011. MONTH({d '2011-12-31'}) is evaluated to 12. DAY({d '2011-12-31'}) is evaluated to 31. HOUR({t '23:59:00'}) is evaluated to 23. MINUTE({t '23:59:00'}) is evaluated to 59. SECOND({t '23:59:00'}) is evaluated to 0. ... SELECT hour ( ov . created ) , count ( ov ) FROM ObjectView ov GROUP BY hour ( ...

 
release

2.7.0

... Fixed a memory leak (Negative snapshot user count) in UPDATE queries on uncommitted changes ( issue #224 ). ... optional. Fixed the "Negative snapshot user count" bug ( issue #83 ). Fixed a page cache purge deadlock ( ...

 
release

2.7.1

... Fixed a memory leak (Negative snapshot user count) in UPDATE queries on uncommitted changes ( issue #224 ). ... optional. Fixed the "Negative snapshot user count" bug ( issue #83 ). Fixed a page cache purge deadlock ( ...

 
manual

ORDER BY clause (JPQL / Criteria API)

Explains how to use the ORDER BY clause in a JPA/JPQL query.... . continents GROUP BY c . currency HAVING COUNT ( c ) > 1 ORDER BY c . currency ...