You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining RelationshipProperties we have to add an Long id field in order to keep track of that relationship. So far so good. With the changes in SDN UUIDs etc. are the way to go for Nodes. However this doesn't seem to be the case for RelationshipProperties. However the Neo4jPersistentEntity throws warnings:
RelationshipProperties is using a Long value for storing internally generated Neo4j ids. The Neo4j internal Long Ids are deprecated, please consider using an external ID generator.
We should be able to switch to a different Generator for the Id field of RelationshipProperties.
The text was updated successfully, but these errors were encountered:
You should be able to use String instead of Long type for ids. The annotation(s) will be the same.
@RelationshipId
private String id;
This is related to the switch from (long) id to (String) elementId as the main internal type of the database itself. When we introduced the support for this type, we also took care to warn the users if they are still using longs for the identifiers.
There is no need (and functionality in SDN) to introduce a custom generated id value here. The message is misleading in this case and should get improved.
Note; we just hit this issue and tried to make the change - all our code broke.
It turns out you can't use String RelationshipIds with Neo4j 4.x even though you get the the warning about using a Long RelationshipId. If you do, the relationships are lost.
To summarise;
Neo4j 4.x: Use Long RelationshipIds only - ignore the warning
Neo4j 5.x: Use a Long or String RelationshipId
Neo4j 6.x: Use String RelationshipIds only
When defining RelationshipProperties we have to add an Long id field in order to keep track of that relationship. So far so good. With the changes in SDN UUIDs etc. are the way to go for Nodes. However this doesn't seem to be the case for RelationshipProperties. However the Neo4jPersistentEntity throws warnings:
We should be able to switch to a different Generator for the Id field of RelationshipProperties.
The text was updated successfully, but these errors were encountered: