Git Product home page Git Product logo

datanucleus-odf's People

Contributors

andyjefferson avatar renataogarcia avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

datanucleus-odf's Issues

Support JPA @OrderBy

When we retrieve a List from ODF we retrieve it in the exact same order as persisted. That is, it is stored as a Collection in the owner object. If a user puts some @orderby annotation they may want the list reordering.

This applies to ALL non-RDBMS datastores, so creating some generic code would make sense and reorder them in-memory, maybe using a Comparator.

NullPointerException after persisting a visibly versioned object to an ODF file

The ODF store doesn't fully support versions when the version is exported into the object.

This occurs against the 5.0.1 platform.

@PersistenceCapable
@Version(strategy = VersionStrategy.VERSION_NUMBER,
    extensions = {@Extension(vendorName = "datanucleus", key = "field-name", value = "version")})
public class Project {

    @Persistent(customValueStrategy = "uuid", primaryKey = "true")
    private String id;

    private String name;

    private long   version;

    /* Standard Getters / Setters skipped */

Attempting to insert a new record causes the insert to succeed but an exception is thrown:

Caused by: java.lang.NullPointerException
    at org.datanucleus.store.odf.ODFPersistenceHandler.insertObject(ODFPersistenceHandler.java:173) ~[datanucleus-odf-5.0.0-release.jar:?]
    at org.datanucleus.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3365) ~[datanucleus-core-5.0.1.jar:?]
    at org.datanucleus.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3341) ~[datanucleus-core-5.0.1.jar:?]
    at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2082) ~[datanucleus-core-5.0.1.jar:?]
    at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:1925) ~[datanucleus-core-5.0.1.jar:?]
    at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1788) ~[datanucleus-core-5.0.1.jar:?]
    at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:713) ~[datanucleus-api-jdo-5.0.1.jar:?]
    at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:739) ~[datanucleus-api-jdo-5.0.1.jar:?]

Removing the @extension fixes the exception, but then the version field isn't updated with the real version number.

I can't tell if the bug is in the ODF Handler around versions or in the Core around the building of the versionColumn field in CompleteClassTable.

Load of query doesnt ensure that all SCOs are wrapped

When we execute a query and use FetchFieldManager, we have to use the constructor for an ExecutionContext (i.e ObjectProvider not yet known). This means that we cannot easily wrap any SCO fields in FetchFieldManager. Consequently we need to call

ObjectProvider.replaceAllLoadedSCOFieldsWithWrappers()

just after the FetchFieldManager process.

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.