Re: datanucleus.query.resultSizeMethod of "COUNT" is only valid for use with JDOQL or JPQL currently


mayank.chawla@...
 
Edited

Hello Andy,

In the same issue, we minimized the extensions and ran the query with below two extensions but our sample program is going into infinite loop in execute method. Please find attached the stacktrace. Since stacktrace was big only limited lines were printed on console, but shows the infinite loop sequence in method call inside it.


PersistenceManager pm = pmf.getPersistenceManager();
    Query q=pm.newQuery("SELECT FROM " + Product.class.getName() + " WHERE price < 150.00 ORDER BY price ASC");
 
q.addExtension( "datanucleus.rdbms.query.resultSetType","scroll-insensitive"); 
q.addExtension( "datanucleus.query.resultSizeMethod", "count");
    List<Product> products = (List<Product>)q.execute();

Thanks.

Join main@datanucleus.groups.io to automatically receive all group messages.