Internal Website Search

1-50 of 139 results

GROUP BY and HAVING clauses

( count , sum, avg, max, min) that are carried out on all the objects (or the object tuples) in ... of SQL: COUNT - returns a long value representing the number of elements. SUM - returns the sum ... (numeric, strings, dates). The following query counts for every letter the number of countries with names

CriteriaBuilder.count(x) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression count (    Expression  x ) Create an aggregate expression applying the count operation. Parameters: x - expression representing input value to count operation Return: count expression Since: JPA 2.0

getting "Unexpected total page count" error when diagnosis mu db by ObjectDB doctor.

When am diagnosis my db it gave following report Global Value Errors ------------------- [1] Unexpected total page count : 512 (expected 449). On repair the db some of query are not working. can you please tell me what does the above error mean and how can i resolve this? Thanks   Manoj

Processing thread count for 8-core server

In reference to the information here:  https://www.objectdb.com/java/jpa/setting/database#The_processing_element _   We are working with an 8-core processor.  The recommended thread count is "more than the number of cores but not too many."  What would be an appropriate number

Running JPA Queries

COUNT (c) FROM Country c", Long.class); long countryCount = query. getSingleResult (); Notice ... query = em. createQuery ("SELECT COUNT (c) FROM Country c"); long countryCount = (Long)query. getSingleResult (); An aggregate COUNT query always returns one result, by definition. In other cases

Unexpected COUNT Results

Unexpected COUNT Results

Paths and Types in JPQL and Criteria API

: SELECT COUNT (e) FROM Object e WHERE TYPE(e) Country Binding an identification variable ( e ... . The SELECT clause counts all these objects (this is an aggregate query with no GROUP BY - all the objects are considered as one group, and COUNT calculates its size). Criteria Query Paths and Types Paths

Strings in JPQL and Criteria Queries

) represents a real % character. LENGTH - Counting Characters in a String The LENGTH (str) function

FROM clause (JPQL / Criteria API)

, BOTH, BY, CASE, CHAR_LENGTH, CHARACTER_LENGTH, CLASS, COALESCE, CONCAT, COUNT , CURRENT_DATE, CURRENT

Is ObjectDB better than competing object databases?

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

JPA Query Structure (JPQL / Criteria)

;( where ). Criteria GROUP BY / HAVING  ( groupBy , having , count , sum , avg , min , max

Numbers in JPQL and Criteria Queries

Numeric values may appear in JPQL queries in many forms: as  numeric literals - e.g. 123 , -12.5 . as parameters - when numeric values are assigned as arguments. as  path expressions - in navigation to persistent numeric fields. as aggregate expressions - e.g. COUNT . as collection

Privacy Policy

gifs) that permit the Company, for example, to count users who have visited those pages or opened

ObjectDB Object Database Features

and aggregates ). ORDER BY (including ASC, DESC). Aggregates ( COUNT , SUM, AVG, MAX, MIN). Query

JPA Criteria API Queries

, join , fetch ). WHERE clause ( where ). GROUP BY / HAVING clauses ( groupBy , having , count , sum

ORDER BY clause (JPQL / Criteria API)

.currency HAVING COUNT (c) 1 ORDER BY c.currency The ORDER BY clause in the above query orders the results by

Threading Problem (maybe with Criteria)

thread safe (as would a ConcurrentLinkedHashMap). FETCH thread nr (36) count : 982 UIDs in 26 msek FETCH thread nr (41) count : 982 UIDs in 29 msek FETCH thread nr (44) count : 982 UIDs in 14 msek FETCH thread nr (39) count : 982 UIDs in 25 msek FETCH thread nr (42) count : 982 UIDs in 31 msek FETCH

Negative snapshot user count

I finally hit an instance of the "Negative snapshot user count " exception 1) [ObjectDB 2.3.2_01 ... .InternalException: Negative snapshot user count com.objectdb.o.InternalException: Negative snapshot user count at com.objectdb.o.SNP.z(SNP.java:292) at com.objectdb.o.SFL.Z(SFL.java:765) at com.objectdb

Negative snapshot user count exception

.objectdb.com/database/issue/new com.objectdb.o.InternalException: Negative snapshot user count com.objectdb.o.InternalException: Negative snapshot user count at com.objectdb.o.SNP.D(SNP.java:344) at com ... , the "Negative snapshot user count " and the "mismatch client-server protocol" errors could be caused by

ClassCastException thrown when running count query

Hello! Attached you find a full stacktrace. The query was: SELECT COUNT (t) FROM Position t WHERE ((t.unit = :unit165w7ppbtu9ao AND t.receiveTime = :receiveTimes232ne30kd42) AND (t.latitude ... exception. Now back to the count query: SELECT COUNT (t) FROM Position t WHERE ((t.unit = :unit AND t

javax.persistence.StoredProcedureQuery

the most general case (multiple result sets and/or update counts , possibly also in combination ... , and false if it is an update count or there are no results other than through INOUT and OUT parameters ... the pending result if it is an update count . The getUpdateCount method will return either the update count

javax.persistence.criteria.CriteriaBuilder

- if an argument is a tuple- or array-valued selection item Since: JPA 2.0 Expression count ( Expression  x) Create an aggregate expression applying the count operation. Parameters: x - expression representing input value to count operation Return: count expression Since: JPA 2.0 Expression

Join performance in Objectdb

SELECT count (e) FROM Meta e, ImageNet i, Page p WHERE e.idImage=i.id AND e.idPage=p.id; So simple ... can predict the time for such counting ? TIA gzdillon Lai Yang Now, after 2 hours ... variant of your query would be: SELECT count (e) FROM Meta e, ImageNet i, Page p WHERE e.image=i

Duplicate Entity class names causes Exception in Query

"), @NamedQuery(name = "objdbTest.Singleton. count ", query = "SELECT COUNT (x) FROM Item x") }) public ... .createNamedQuery("objdbTest.Singleton. count ", Long.class); q.setFlushMode(FlushModeType.AUTO); try { return ... (name = "objdbTest.Singleton. count ", query = "SELECT COUNT (x) FROM objdbTest.Item x

Memory Leak in EntityManagerFactory ?

PMImpl objects but with no  QPtBearbeiter instances? One direction forward is to count ... check it tomorow). Arne Arne Stocker create_cound and close_ count are identical. I made create_ count ++ and close_ count ++ each synchronized . And in the end, there was no memory leak at all. Removing

EntityManagerFactory Fails To Swtich Over To Slave When Master Is Unavailable

back over to the master (10,000). COUNT = 9 Entity manager is: ObjectManager of /10.9.2.15:10001 [2013-05-08 ... : 5000 Average X: 499.5 COUNT = 10 Entity manager is: ObjectManager of /10.9.2.15:10000 [2013-05-08 11 ... only to the slave, I get the following exception. COUNT = 0 Failed to create entity manager. COUNT = 1 [ObjectDB 2.5

Query Method NullPointerException on List iteration

: categoryId categoryName   Expected query outcome: SupplierName Category1_ Count Category2_ Count ... count = 0; for (Product p : products) { if (p.getCategory().getCategoryName().equals(categoryName)) { count ++; } } return count ; }   Problem: I get a NullPointerException on List products

how to query by properties of onetomany relations? (Error 990)

;         "select count (f) from Foo f where f.bars.name = :name ... ;     System.out.println(" Count : " + query.getSingleResult());     ... to the standard JPQL. The following 2 queries are now equivalent: select count (f) from Foo f where f

StoredProcedureQuery.getUpdateCount() - JPA Method

JPA Method in javax.persistence.StoredProcedureQuery int getUpdateCount () Return the update count or -1 if there is no pending result or if the next result is not an update count . Return: update count or -1 if there is no pending result or if the next result is not an update count Throws

StoredProcedureQuery.executeUpdate() - JPA Method

JPA Method in javax.persistence.StoredProcedureQuery int executeUpdate () Return the update count of -1 if there is no pending result or if the first result is not an update count . The provider will call execute on the query if needed. Return: the update count or -1 if there is no pending result

Exception on creation when running multithreaded

. Now after the CDIs creation I'm running a count query and it returns 800 as expected, then I run ... PDIs I create the 800 Organisations I do a count on Organisations and get 800 and then I do "select $1 ... on the first query I'm getting back 0 objects, even though the count before it shows there are 800

OEM licencing limitation

how is the number of persistent objects counted . We unfortunately don't have the objectdb file anymore ... (); } Could you please confirm us, how the licencing works in this case? Are only internal entities counted to limited number or ... and instances of unsigned classes are counted . In this case, if test is enhanced with an OEM activation

JBOSS AS7 7.1.1 - Entity not persisted and createNamedQuery fire exception

; query.getResultList();   System.out.println( "persisted Guest count : " + guests.size() );   ... :13,454 INFO  [stdout] (http--127.0.0.1-8080-1) persisted Guest count : 0 18:51:18,219 INFO  ... ; [stdout] (http--127.0.0.1-8080-1) persisted Guest count : 1 but immediately after getAllGuests

Replication Issue

;   int count = 0;         while( true )     ... ; DummyEntity x = new DummyEntity(String.valueOf( count ));          ... ; System.out.println( count +":" +x.toString());           

CriteriaBuilder.countDistinct(x) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression countDistinct (    Expression  x ) Create an aggregate expression applying the count distinct operation. Parameters: x - expression representing input value to count distinct operation Return: count distinct expression Since: JPA 2.0

Internal exception when updating date filed (TemporalType.DATE)

GENERATE_PERSONS_ COUNT = 1000;         private EntityManagerFactory ... _PERSONS_ COUNT );             }     ... ; }         private void createPersons(long count ) {   

Bulk Delete and Update - best practice?

the following test I'm expecting the second row count to be 0 if the database is dropped  ... .createQuery("SELECT COUNT (d) from CacheData d", Long.class); long rows = q.getSingleResult ... .createEntityManager(); q = em.createQuery("SELECT COUNT (d) from CacheData d", Long.class); rows = q.getSingleResult

StoredProcedureQuery.hasMoreResults() - JPA Method

JPA Method in javax.persistence.StoredProcedureQuery boolean hasMoreResults () Return true if the next result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any. Return: true if next result corresponds

StoredProcedureQuery.getOutputParameterValue(position) - JPA Method

JPA Method in javax.persistence.StoredProcedureQuery Object getOutputParameterValue (   int position ) Retrieve a value passed back from the procedure through an INOUT or OUT parameter. For portability, all results corresponding to result sets and update counts must be retrieved

StoredProcedureQuery.execute() - JPA Method

JPA Method in javax.persistence.StoredProcedureQuery boolean execute () Return true if the first result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any. Return: true if first result corresponds to result

StoredProcedureQuery.getOutputParameterValue(parameterName) - JPA Method

JPA Method in javax.persistence.StoredProcedureQuery Object getOutputParameterValue (   String parameterName ) Retrieve a value passed back from the procedure through an INOUT or OUT parameter. For portability, all results corresponding to result sets and update counts

javax.persistence.ConstructorResult

.createNativeQuery( "SELECT c.id, c.name, COUNT (o) as orderCount, AVG(o.price) AS avgOrder " + "FROM

[ODB1] Chapter 7 - JDOQL Queries

objects can be obtained using the size() method: int count = result.size(); Iteration over the result

Issue with cascade delete & add/remove

;      int Address_1_ Count = ((Long) em.createQuery(             "SELECT COUNT (a) FROM Address a WHERE street = '1'")   ... ;       int Address_2_ Count = ((Long) em.createQuery(    

DBDoctor BTree Errors

.pool.PoolImpl   - Unexpected page count : 958 (actual 1)   - Unexpected object count : 9043 ... count : 8 (actual 1)   - Unexpected object count : 392 (actual 1) [3] com.btc.ep.base.bl.internal.dmos.licensing.LicensingInfoImpl   - Unexpected object count : 4 (actual 1) [4] com.btc.ep.base

Out of Memory - Slow leak?

. It seems that there is a problem with some heavy objects that ObjectDB manages using reference counting . Somehow in an unknown situation the reference count drops to -1 and then the objects are pinned ... . It should solve the problem by blocking an attempt to decrease the reference count below 0. In addition

Doctor bug?

count : 1 (actual 0) [2] net.pocketservices.athene.objects.persistent.HotUser - Unexpected object count : 1 (actual 0) [3] net.pocketservices.athene.objects.persistent.Person - Unexpected object count : 2 (actual 0) [4] net.pocketservices.athene.objects.persistent.ReadPointer - Unexpected object count

Corrupt database page

------------------ [1] com.btc.ep.base.bl.internal.dmos.message.MessageImpl   - Unexpected object count ... field count (12 instead of 6)   com.btc.ep.base.bl.internal.dmos.message.MessageImpl(375 ... ] Page #11436 entry 2 has unexpected field count (44 instead of 6)   com.btc.ep.base.bl.internal

stress test -> com.objectdb.o.InternalException: null

/issue/new com.objectdb.o.InternalException: Negative snapshot user count com.objectdb.o.InternalException: Negative snapshot user count at com.objectdb.o.SNP.D(SNP.java:344) at com.objectdb.o.SFL.aa(SFL ... owner. The "Negative snapshot user count " error and a memory leak that its causes have not been fixed

Unexpected exception (Error 990) on find

------------------- [1] Unexpected total object count : 850986 (expected 850977) [2] Unexpected total page count ... - Unexpected object count : 850986 (actual 850977) Page Relation Errors -------------------- [1] Page