-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDO @Join relationships not persisted #27
Comments
What you're expecting there I've no idea. See the documentation for what is persisted 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 |
see I was using and rdbms before switching to Neo4j. Maybe the 'Join' is not necessary for Neo4j, but it does seem to be needed for RDBMS. |
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. |
Still doesn't explain why the second object is not persisted. Please re open and I will create a test case |
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. |
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 |
I have two classes, as below.
When I store (makePersistent) an instance of the container,
the items do not get persisted.
This works fine with datanucleus-rdbms
@PersistenceCapable
class Container {
@PrimaryKey
@Persistent
public String getIdentity() {...}
}
@PersistenceCapable
class Item {
@PrimaryKey
@Persistent
public String getIdentity() {...}
}
The text was updated successfully, but these errors were encountered: