Comments (7)
I have made a local modification of LazyLoadQueryResult.getNextObject() to
protected Object getNextObject()
{
if (result == null)
{
// Already exhausted
return null;
}
if (result.hasNext()) {
Map<String, Object> map = result.next();
Object rowResult = getResultFromMapRow(map);
itemsByIndex.put(itemsByIndex.size(), rowResult);
return rowResult;
} else {
// Reached end of results, so null the iterator to signify this
result.close();
result = null;
return null;
}
}
which seems to work
from datanucleus-neo4j.
When I have a query that has no results (org.datanucleus.store.neo4j.query.LazyLoadQueryResult) all works fine, so please create a testcase as per the provided template so we can see what you see. Thx
from datanucleus-neo4j.
Where are the test cases ? and the template?
expected to find them in src/test/java !
from datanucleus-neo4j.
The testcase template was on the "New Issue" page when you raised this (and presumably deleted the template text). It contained the URL http://www.datanucleus.org/documentation/problem_reporting.html
which, for JDO, points to
https://github.com/datanucleus/test-jdo
from datanucleus-neo4j.
Test case
https://github.com/dhakehurst/test-jdo.git
T E S T S
Running org.datanucleus.test.SimpleTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.033 sec <<< FAILURE!
Results :
Failed tests: simpleTest(org.datanucleus.test.SimpleTest): Failed test : next on empty iterator
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
from datanucleus-neo4j.
Test executed on:
macOS Sierra
Version 10.12.3
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
from datanucleus-neo4j.
Your patch applied, thx.
FWIW you do not supply "ConnectionDriver" to Neo4j since it will be ignored as per the docs. You also do not need to play around with properties to create a PMF, when the test template already has a persistence.xml defined with all of that in.
from datanucleus-neo4j.
Related Issues (20)
- Support core-135
- Support core-159
- Support core-153
- Support SoftDelete of objects
- Move to latest 3.1.3 release of neo4j libraries HOT 4
- JDO @Join relationships not persisted HOT 6
- Load of query doesnt ensure that all SCOs are wrapped HOT 1
- Multiple Primary Keys fail HOT 2
- CompoundIdentity is not supported HOT 2
- Support core-233
- Retrieval code doesnt handle primitive retrieval when not existing in database
- Support for missing (non-String) columns in Neo4j database. HOT 1
- Creates new Object instead of setting it to another Object. HOT 4
- Ineqeulity Filter method, .ne() gives QueryExecutionException. HOT 3
- Support for queries with "IS NULL" / "IS NOT NULL"
- Support for Filter method String.contains(). HOT 42
- Support String toUpperCase/toLowerCase/trim/trimLeft/trimRight/substring in JDOQL/JPQL
- Support Numeric cos/sin/tan/acos/asin/atan/toDegrees/toRadians in JDOQL/JPQL
- Support for String startsWith/endsWith/matches in queries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datanucleus-neo4j.