Giter Club home page Giter Club logo

Comments (6)

andyjefferson avatar andyjefferson commented on July 20, 2024

What you're expecting there I've no idea. See the documentation for what is persisted
http://www.datanucleus.org/products/accessplatform_5_1/datastores/datastores.html#neo4j

Indeed Node + Relationship + Node are persisted, and they are read back in on getObjectById or query operations (in all of my tests).

There is no such concept of a "join table" supported so putting @Join makes no difference to anything. If you mean you want to contribute some support for persisting @Join in some other way then this is where you link your pull requests

from datanucleus-neo4j.

dhakehurst avatar dhakehurst commented on July 20, 2024

see
http://www.datanucleus.org/products/accessplatform_4_1/jdo/orm/one_to_many_list.html
1 to N relationships are either by Foreign-Key or Join Table

I was using and rdbms before switching to Neo4j.
JDO is supposed to mean I don't need to know what type of db is being used.
So the same JDO annotated classes should be useable irrespective of the db type.
Yes ?

Maybe the 'Join' is not necessary for Neo4j, but it does seem to be needed for RDBMS.

from datanucleus-neo4j.

andyjefferson avatar andyjefferson commented on July 20, 2024

The JDO spec contains some ORM aspects (that apply to RDBMS only), and some that are general. The JDO spec doesn't make a clear definition of how they should be applied because every database is different. The ORM aspects of the spec always apply to RDBMS, that part is defined in the JDO spec, but they do not always apply to "NoSQL". If you wanted to define some of what applies to NoSQL, you go to https://issues.apache.org/jira/browse/JDO-651

With current DN handling you don't need to know what type of DB is being used. It persists objects to Neo4j irrespective of what you put for @Join, and just ignores that metadata. There is nothing in the JDO spec that says you should invent some intermediate object (a Node in Neo4j), and then have a Relationship from A to A_B, and then a Relationship from A_B to B. That is what RDBMS requires.

from datanucleus-neo4j.

dhakehurst avatar dhakehurst commented on July 20, 2024

Still doesn't explain why the second object is not persisted.

Please re open and I will create a test case

from datanucleus-neo4j.

andyjefferson avatar andyjefferson commented on July 20, 2024

Did you read the link i gave? If I have an object A with a collection of B's it persist all objects as Nodes, and has Relationship objects between them.

from datanucleus-neo4j.

dhakehurst avatar dhakehurst commented on July 20, 2024

Yes, of course read it!

I will create a test case and make a new issue seeing as it has nothing to do with the Join annotation

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.