spring-data-neo4j-4

Deploy a Procedure to Neo4J when using the embedded driver

余生颓废 提交于 2019-12-04 12:56:16
I have some logic which needs direct node access to neo4j but the rest of the app using Spring Data Neo4j (SDN) for simplicity. I thought to use a procedure with @Procedure, but I'm not sure how to use that procedure when using the neo4j embedded driver and SDN4. My configuration is very barebones as below: @Configuration @EnableNeo4jRepositories(basePackages = "recommender.repository") @ComponentScan(basePackages = "recommender") @EnableTransactionManagement public class MyNeo4jConfiguration extends Neo4jConfiguration { @Bean public SessionFactory getSessionFactory() { System.out.println("***

How to control depth on custom Spring Data Neo4j repository methods?

心不动则不痛 提交于 2019-12-04 05:44:43
For example, if I want to get list of users by name: class UserRepository extands GraphRepository<User> { List<User> findByName(String name); } then how to set loading depth to 2? I tried to find answer in the SDN 4.0.0.RC2 docs , but it isn't contains anything about this issue. Derived finders do not yet support a depth. You'll have to write a custom query or use the loadAllByProperty method on the Neo4jTemplate if applicable. This should have been mentioned in the docs, we'll add it. As of SDN 4.2.0-M1 , this feature has been implemented. It hasn't made it to the reference documentation at

SDN 4 - InProcessServer broken in snapshot build

你离开我真会死。 提交于 2019-12-02 07:13:44
问题 Since about a week ago, running tests with InProcessServer on 4.0.0.BUILD-SNAPSHOT results in the following exception: Caused by: java.lang.NoClassDefFoundError: org/neo4j/ogm/testutil/TestServer at org.springframework.data.neo4j.server.InProcessServer.<init>(InProcessServer.java:25) ~[spring-data-neo4j-4.0.0.BUILD-SNAPSHOT-tests.jar:na] at com.ninjasquare.server.test.integration.IntegrationTestConfig.neo4jServer(IntegrationTestConfig.java:43) ~[test-classes/:na] Swithing the test dependency

SDN 4 - InProcessServer broken in snapshot build

谁说胖子不能爱 提交于 2019-12-02 06:01:16
Since about a week ago, running tests with InProcessServer on 4.0.0.BUILD-SNAPSHOT results in the following exception: Caused by: java.lang.NoClassDefFoundError: org/neo4j/ogm/testutil/TestServer at org.springframework.data.neo4j.server.InProcessServer.<init>(InProcessServer.java:25) ~[spring-data-neo4j-4.0.0.BUILD-SNAPSHOT-tests.jar:na] at com.ninjasquare.server.test.integration.IntegrationTestConfig.neo4jServer(IntegrationTestConfig.java:43) ~[test-classes/:na] Swithing the test dependency back to 4.0.0.M1 resolves the issue: <dependency> <groupId>org.springframework.data</groupId>

How To Merge Instead of Create With Neo4jTemplate

心不动则不痛 提交于 2019-12-01 10:20:55
问题 I'm currently iterating over an array where each index contains two nodes and a relationship (Part_1 -> Part_2), and I'm using the Neo4jTemplate.save() method to persist it into the database. However, some indexes have repeated nodes that will have relationships with other nodes (Part_2 -> Part_3). My version currently creates a new node and relationship every time instead of merging if a node already exists. I read this post, but I don't understand how to implement it so that two of the same

GraphQueryLookupStrategy.resolveQuery exception on migration from SDN 4.0 to SDN 4.1.RC1

天涯浪子 提交于 2019-12-01 09:31:46
I am in the process of migrating my application to use SDN 4.1.0.RC1 but have encountered a few issues after trying to boot the application. I have made the necessary configuration changes to correctly use the HTTPDriver to my remote server (localhost:7474) and when booting the application I get the following error with one of my repositories while attempting to load the spring context. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org

GraphQueryLookupStrategy.resolveQuery exception on migration from SDN 4.0 to SDN 4.1.RC1

余生长醉 提交于 2019-12-01 08:54:47
问题 I am in the process of migrating my application to use SDN 4.1.0.RC1 but have encountered a few issues after trying to boot the application. I have made the necessary configuration changes to correctly use the HTTPDriver to my remote server (localhost:7474) and when booting the application I get the following error with one of my repositories while attempting to load the spring context. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name

Neo4j TimeTree REST API Previous and Next Navigation

删除回忆录丶 提交于 2019-12-01 07:40:36
问题 I am currently using Neo4j TimeTree REST API and is there any way to navigate to the time before and after a given timestamp? My resolution is Second and I just realize that if the minute has changed, then there is no 'NEXT' relationship bridging the previous Second in previous Minute to the current Second. This makes the cypher query quite complicated and I just don't want to reinvent the wheel again if it's already available. Thanks in advance and your response would be really appreciated!

Spring Data Neo4J 4.0.0: BeforeSaveEvent not firing?

自作多情 提交于 2019-12-01 07:10:45
问题 I'm trying to capture the BeforeSaveEvent when setting up Neo4J in Spring, so that I can call a method beforeSave() on the class that is being saved. Unfortunately, it seems like its not being registered as a listener as non of my print statements are being executed. Ideas appreciated. @Configuration @EnableNeo4jRepositories(basePackages = "com.noxgroup.nitro") @EnableTransactionManagement public class NitroNeo4jConfiguration extends Neo4jConfiguration { @Bean public Neo4jServer neo4jServer (

Neo4j TimeTree in Spring Data Neo4j 4.0

柔情痞子 提交于 2019-11-29 12:27:00
I'm trying to utilize the timetree library in my spring data neo4j 4.0.0 project. As elaborated in this page, https://github.com/graphaware/neo4j-timetree , I've edited my neo4j.properties file to enable the auto event attaching, add timetree dependency to my gradle, and set a property 'creationDate' in the event node with Long data type. Albeit everything looks as it should be, it still doesn't create any timetree. Hereby is my neo4j.property file: # Runtime must be enabled like this com.graphaware.runtime.enabled=true # A Runtime module that takes care of attaching the events like this (TT