About MAX

manual

GROUP BY and HAVING clauses

Explains how to use the GROUP BY and HAVING clauses in a JPA/JPQL query.... Aggregate calculations (count, sum, avg, max, min) that are carried out on all the objects (or the object tuples) in the ... values (numeric, strings, dates). MAX - returns the maximum of comparable values (numeric, strings, dates). ...

 
api-jpa

max(x)

Create an aggregate expression applying the numerical max operation.(Method of javax.persistence.criteria.CriteriaBuilder)

 
manual

Server Configuration

Explains how to set a JPA/JDO database server using ObjectDB, the fast Java object database for JPA/JDO.... > <connection port = "6136" max = "0" /> <data path = "$objectdb/db-files" ... element <connection port = "6136" max = "0" /> The <connection> element specifies ...

 
forum_thread

Error using query with MAX() function

I have a class that is persisting a Entity that holds remarks and a time. Then when I query for the latest remark I get a internal error when the remark is larger than 1966 chars. Here is a test class and entity that reproduces the problem on my system. ... ) ;   Expression me = cb. max ( c ) ; CriteriaQuery<Object> s = q. ... #150 query.manager] <queryRequest query="SELECT MAX($1.addDate) FROM Notes $1 WHERE $1.addDate IS NOT NULL" args="null" ...

 
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. #1 2014-01-10 19:57 Hi, we have severe problems with ObjectDB crashing frequently. We can’t find the exact cause but we suspect ...

 
forum_thread

EntityManagerFactory Fails To Swtich Over To Slave When Master Is Unavailable

I have a simple task to validate the sample code will switch over to the slave database when the master is unavailable. I simulate the master unavailable by stopping the master server; which generates the following exception below. What am I doing wrong? It appears the connection manager fails to try the second URL in the list: objectdb://10.9.2.15:9998//10.9.2.15:9999/test.odb;user=admin;password=password Thank you in advance. ... <log path = "$objectdb/log/" max = "8mb" stdout = "true" stderr = "true" / > ... = "true" sync = "true" path = "." max = "128mb" / > <recording enabled = ...

 
forum_thread

com.objectdb.o.NLV cannot be cast to com.objectdb.o.RSV

Hello! This query is working fine SELECT DISTINCT $1 FROM ChatHistoryItem $1 JOIN $1.recipient $2 JOIN $1.sender $3 WHERE ($2.id='22afeafe-363f-4397-8553-cc5688ba142d') OR ($3.id='22afeafe-363f-4397-8553-cc5688ba142d')  ORDER BY MAX($1.createDate) DESC   but this query returns an exception "com.objectdb.o.NLV cannot be cast to com.objectdb.o.RSV" SELECT DISTINCT $1 FROM ChatHistoryItem $1 JOIN $1.recipient $2  ... )   ORDER BY MAX ( $1 . createDate ) DESC   but ... ) ORDER BY MAX ( $1 . createDate ) DESC   entity ... eval="12.7207" order="desc(max(any(any($1.createDate))))"> <multiVarPlan plan = ...

 
manual

JPA Query Structure (JPQL / Criteria)

Explains the structure of a JPQL query, which consists of 6 clauses: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY.... operation. See JavaDoc Reference Page... , max max(x) CriteriaBuilder's method Create an aggregate expression ...

 
forum_thread

em.flush(); em.clear(); loosing data and not persisting managed objects

I'm having trouble with flush() and clear() in a loop inside a transaction not persisting modified objects to database. Sometimes it does other times it doesn't. Here is my Entity. ... for ( int i = 0 ; i<Integer. MAX_VALUE ; i ++ ) { TestEntity v = new ... #132 query.manager] <queryRequest query="SELECT MAX($1.addDate) FROM Notes $1 WHERE $1.addDate IS NOT NULL" args="null" ...

 
manual

JPA Criteria API Queries

Explains how to use the JPA Criteria API (CriteriaBuilder, CriteriaQuery, etc.) to build JPQL like queries.... operation. See JavaDoc Reference Page... , max max(x) CriteriaBuilder's method Create an aggregate expression ...