Giter Club home page Giter Club logo

Comments (7)

dhakehurst avatar dhakehurst commented on July 20, 2024

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.

andyjefferson avatar andyjefferson commented on July 20, 2024

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.

dhakehurst avatar dhakehurst commented on July 20, 2024

Where are the test cases ? and the template?
expected to find them in src/test/java !

from datanucleus-neo4j.

andyjefferson avatar andyjefferson commented on July 20, 2024

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.

dhakehurst avatar dhakehurst commented on July 20, 2024

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.

dhakehurst avatar dhakehurst commented on July 20, 2024

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.

andyjefferson avatar andyjefferson commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.