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
Copy file name to clipboardExpand all lines: docs/developer-guide/getting-started-with-persistence.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
This page contains explanations and code samples for developers who need to store their entities into the database.
6
6
7
7
The Strongbox project uses [JanusGraph](https://janusgraph.org/) as its internal persistent storage through the
8
-
corresponding [Gremlin](https://tinkerpop.apache.org/gremlin.html) implementation and [spring-data-neo4j](https://spring.io/projects/spring-data-neo4j#overview) middle tier. Also we use `JTA` for transaction management and the `spring-tx` implementation module from the Spring technology stack.
8
+
corresponding [Gremlin](https://tinkerpop.apache.org/gremlin.html) implementation and [spring-data-neo4j](https://spring.io/projects/spring-data-neo4j#overview) middle tier. We also use `JTA` for transaction management and the `spring-tx` implementation module from the Spring technology stack.
9
9
10
10
## Persistence stack
11
11
@@ -17,9 +17,9 @@ We're using the following technology stack to deal with persistence:
17
17
-[spring-data-neo4j](https://github.com/spring-projects/spring-data-neo4j) to manage transactions in Spring with `Neo4jTransactionManager` and implement custom Cypher queries with Spring Data repositories (by custom queries via the `@org.springframework.data.neo4j.annotation.Query` annotation)
18
18
-[cypher-for-gremlin](https://github.com/opencypher/cypher-for-gremlin) which translates Cypher queries into Gremlin traversals (it has some issues which prevent us from using it for `neo4j-ogm` CRUD operations, these issues will be explained below)
19
19
-[neo4j-ogm](https://github.com/neo4j/neo4j-ogm) to map Java POJOs into Vertices and Edges of Graph
20
-
- We also use custom `EntityTraversalAdapters`, which implement anonimous Gremlin traversals for CRUD operations under `neo4j-ogm` entities.
20
+
- We also use custom `EntityTraversalAdapters`, which implement anonymous Gremlin traversals for CRUD operations under `neo4j-ogm` entities.
21
21
22
-
# Vertices and Edges
22
+
##Vertices and Edges
23
23
24
24
Unlike a relational DBMS, Graph DBMS have vertices and edges, not rows and tables. So, in terms of Graph, every persistent entity should be stored as vertex or edge. An example of a vertex might be `Artifact` or `AritfactCoordinates` and the relation between them would be an edge. It should be noted that, unlike RDBMS, object relations are represented by a separate edge, instead of just a foreign key column in a table. In addition to vertices, persistence objects can also be edges -- for example, the `ArtifactDependency` would be an edge between `ArtifactCoordinates` vertices.
25
25
@@ -178,7 +178,7 @@ In addition to CRUD operations, there is also the need to be able to select data
178
178
179
179
Putting together all the above, the repository for the `PetEntity` will look like below:
180
180
181
-
```
181
+
```java
182
182
packageorg.carlspring.strongbox.repositories;
183
183
184
184
importjavax.inject.Inject;
@@ -225,7 +225,7 @@ interface PetQueries
225
225
}
226
226
```
227
227
228
-
# Issues of `cypher-for-gremlin` and `neo4j-ogm`
228
+
##Issues of `cypher-for-gremlin` and `neo4j-ogm`
229
229
230
230
The first issue that we have, is the fact that `cypher-for-gremlin` does not fully suport all Cypher syntax that is produced by `neo4j-ogm` for CRUD operations. To be more specific, on every CRUD operation, `neo4j-ogm` generates a Cypher query which is then translated to Gremlin by `cypher-for-gremlin`. As a workadound, we modify Cypher queries produced by `neo4j-ogm` and replace some clauses (see `org.opencypher.gremlin.neo4j.ogm.request.GremlinRequest`).
0 commit comments