About COUNT

forum_thread

How to convert a boolean to an int in the query?

How to convert a boolean to an int in the query? I have five parameters of type boolean in the entity object - approveEmail, approvePhoneNumper, ... I can not sort them ORDER BY approveEmail, approvePhoneNumper, .... because the parameters equivalent. I want to sort them in the query by their sum ORDER BY (approveEmail + approvePhoneNumper + ... ) But I get an exception com.objectdb.o._PersistenceException: Invalid operand type boolean for operator + ... + m . approvePhoneNumber + ... + ( count ( likedPersons ) > 0 ) ) ...

 
faq

Is ObjectDB better than competitive object databases?

... products do not support aggregate queries (max, min, count, sum and avg). ObjectDB supports rich queries, including aggregate ...

 
release

2.6.5

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

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

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

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

 
issue

Internal Exception: null

The query SELECT COUNT(t) FROM TrackerUser t WHERE NOT t.username = :username with :username -> "admin" leads to the following exception: ... The query SELECT COUNT ( t ) FROM TrackerUser t WHERE NOT t . ...

 
forum_thread

Exceeding max connections and crashing

Hi, we have severe problems with ObjectDB crashing frequently. We can’t find the exact cause but we suspect several things. We use 2.5.3_03 version and we use it in production. The same setup in test environment hasn’t have these kind of problems First crash occurred when network went down and database lost connection with the JBOSS AS, several restarts got it up and running finally.  It seems when the database loses network connection it shutdowns but we cant be sure. Usualy database stops once a day with no apperent reason. ... the number of network connections to the database, initial count was 500 but it wasn’t enough and we increased it to 5000 but after ...

 
forum_thread

Entity has be persistended,but query not fetched?

I create a new entity T newT and persistend it,then I create a query "select t from T t" to fetch all T entities.But  then the newT is not contain in the query result. Why? ... ) ; System. out . println ( "count: " + query. getResultList ( ) . size ( ...

 
issue

New entity objects are duplicated on merge cascading

When merge is cascaded to a new entity object that has not been persisted yet - it becomes persisted twice. This was demonstrated by a Java EE application in this forum thread but may be reproduced also in a simple console test case: ... Query query = em. createQuery ( "SELECT COUNT(c) FROM Chapter c" ) ; System. out . println ...