neo4j-ogm

Transactions and relationship entities mapping problems with Neo4j OGM

痞子三分冷 提交于 2019-12-11 04:13:06
问题 Versions used: spring-data-neo4j 4.2.0-BUILD-SNAPSHOT / neo4j-ogm 2.0.6-SNAPSHOT I'm having problems to correctly fetch relationship entities . The following fetch calls don't return consistent results (executed in the same transaction): session.query("MATCH (:A)-[b:HAS_B]-(:C) RETURN count(b) as count") returns 1 session.query("MATCH (:A)-[b:HAS_B]-(:C) RETURN b") correctly returns the relationship entity as a RelationshipModel object session.query(B.class, "MATCH (:A)-[b:HAS_B]-(:C) RETURN

Load an object in Neo4j OGM 1.1.3 ogm depth of 2 very slow

柔情痞子 提交于 2019-12-08 21:57:28
问题 I get a timeout while querying for depth 2 using session.load() .I'm working with Neo4j OGM 1.1.3 (Attempting to migrate from Spring Data Neo4j 3.4). Trying to load a Node object class Node { Long id; String name; @Relationship(type="NodeToCategory") Category category; @Realtionship(type="NodeToChildNode") Node node } class Category { Long id; String name; String color; Date createdAt; } The category that is connected to my node is very popular (20,000 nodes have the same category) and when I

java.lang.ClassNotFoundException Every time I change something in my code (Neo4j OGM + Play!)

孤者浪人 提交于 2019-12-06 13:53:38
问题 Im using Neo4J OGM + Play Framework since 2 weeks succesfully, but today it doesn't work anymore. Every time I change something in my code, no matter if in a NodeEntity Class or in any other Class, it causes a java.lang.ClassNotFoundException when I try to get something from the database using the find method from org.neo4j.ogm.session.Session. Only if I clear the database and refill it I'm able to insert and get my NodesEntities. Java version: 1.8 Scala version: 2.11.7 Sbt version: 2.6.3

Is it possible to dynamically construct a neo4j cypher query using the GraphRepository pattern

半世苍凉 提交于 2019-12-06 02:12:01
问题 CONTEXT : I am developing a java Spring Boot system backed by a neo4j database. I access the database using the "ClassRepo extends GraphRepository" structure. Writing queries is a simple case of hard coding in my precise query and replacing a specified part of it with a supplied parameter (in this case courseName). @Query("MATCH (node:Course) WHERE node.name = {courseName} RETURN node LIMIT 1") Course findByName(@Param("courseName") String name); This has all worked fine for me, allowing me

Neo4j 3.0 and spring data

可紊 提交于 2019-12-05 19:45:08
I would like to use the new bolt protocol to connect my spring application to neo4j 3.0 database. Is bolt protocol already implemented in spring data? Yes, these versions support Bolt: Neo4j OGM 2.0.2, which can be used with SDN 4.1.1.RELEASE (you will need to explicitly include this Neo4j OGM version). Or the current SDN snapshot 4.2.0.BUILD-SNAPSHOT which depends on the latest Neo4j OGM snapshot. The Bolt Driver dependency is also required: <dependency> <groupId>org.neo4j</groupId> <artifactId>neo4j-ogm-bolt-driver</artifactId> <version>2.0.2</version> </dependency> Configuration for the

java.lang.ClassNotFoundException Every time I change something in my code (Neo4j OGM + Play!)

一曲冷凌霜 提交于 2019-12-04 18:30:45
Im using Neo4J OGM + Play Framework since 2 weeks succesfully, but today it doesn't work anymore. Every time I change something in my code, no matter if in a NodeEntity Class or in any other Class, it causes a java.lang.ClassNotFoundException when I try to get something from the database using the find method from org.neo4j.ogm.session.Session. Only if I clear the database and refill it I'm able to insert and get my NodesEntities. Java version: 1.8 Scala version: 2.11.7 Sbt version: 2.6.3 build.sbt : libraryDependencies += "org.neo4j" % "neo4j-ogm-core" % "3.0.0-RC1" libraryDependencies +=

Depth in custom Cypher queries with OGM always 0?

吃可爱长大的小学妹 提交于 2019-12-03 15:51:22
I'm currently evaluating OGM / Spring Data Neo4j for a use case and came upon the following problem: When executing a custom Cypher query either via Spring Data @Query annotation or directly via the Neo4j Session , the result contains only the nodes directly queried for and not the related nodes (relationships are null in the resulting node objects). I.e. the depth for these queries seems to be 0 and not 1, as I would have expected from the docs. How can I execute a custom Cypher query via OGM or Spring Data Neo4j that has depth 1? The default depth 1 refers to findOne/findAll/.. methods from

How to configure Neo4j embedded to run apoc procedures?

孤街醉人 提交于 2019-12-01 03:46:50
问题 I have setup Neo4j using the latest spring 1.5 release, spring-data-neo4j 4.2, with ogm drivers. The configuration is using embedded driver without URI (so impermanent database store) Here is the spring @Configuration bean content: @Bean public org.neo4j.ogm.config.Configuration neo4jConfiguration() { org.neo4j.ogm.config.Configuration configuration = new org.neo4j.ogm.config.Configuration(); configuration.driverConfiguration().setDriverClassName("org.neo4j.ogm.drivers.embedded.driver