spring-data-neo4j

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

Can't move to Neo4j 2.2.0 and Spring Data Neo4j 3.3.0.RELEASE

陌路散爱 提交于 2019-11-29 03:46:23
问题 I use Spring 4.1.6.RELEASE and Spring Boot 1.2.3.RELEASE. Right now, I can't smoothly move from Neo4j 2.1.7 and SDN 3.2.2.RELEASE to Neo4j 2.2.0 and SDN 3.3.0.RELEASE First of all, Neo4jHelper class is absent... so what should be used instead ? Also, my tests crashes with a following exceptions: org.springframework.dao.InvalidDataAccessApiUsageException: nested exception is org.neo4j.graphdb.NotInTransactionException at org.springframework.data.neo4j.support.Neo4jExceptionTranslator

save method of CRUDRepository is very slow?

被刻印的时光 ゝ 提交于 2019-11-29 00:21:16
i want to store some data in my neo4j database. i use spring-data-neo4j for that. my code is like the follow: for (int i = 0; i < newRisks.size(); i++) { myRepository.save(newRisks.get(i)); System.out.println("saved " + newRisks.get(i).name); } My newRisks-array contains circa 60000 objects and 60000 edges. Every node and edge has one property. The duration of this loop is circa 15 - 20 minutes, is this normal? I used Java VisualVM to search some bottlenecks, but my average CPU usage was 10 - 25% (of 4 cores) and my heap was less than half full. There are any options to boost up this operation

Tests fail with a TransactionRequiredException: no transaction is in progress exception when loading both JPA and Neo4J configurations

烂漫一生 提交于 2019-11-28 13:55:24
I have a JPA web application with some integration tests against the JPA repositories. There are no integration tests against the Neo4J repositories yet. Now, I have added some Neo4J functionality to this existing JPA web application. I'm this now using Neo4J repositories, alongside JPA repositories. My entities and repositories are named differently and are sitting in different packages. My tests all extend the following class: @WebAppConfiguration @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { ApplicationConfiguration.class, WebSecurityTestConfiguration.class,

Lazy/Eager loading/fetching in Neo4j/Spring-Data

你离开我真会死。 提交于 2019-11-28 07:36:01
I have a simple setup and encountered a puzzling (at least for me) problem: I have three pojos which are related to each other: @NodeEntity public class Unit { @GraphId Long nodeId; @Indexed int type; String description; } @NodeEntity public class User { @GraphId Long nodeId; @RelatedTo(type="user", direction = Direction.INCOMING) @Fetch private Iterable<Worker> worker; @Fetch Unit currentUnit; String name; } @NodeEntity public class Worker { @GraphId Long nodeId; @Fetch User user; @Fetch Unit unit; String description; } So you have User-Worker-Unit with a "currentunit" which marks in user

Neo4j TimeTree in Spring Data Neo4j 4.0

旧街凉风 提交于 2019-11-28 06:29:26
问题 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

Spring / @Transactional with AspectJ is totally ignored

ε祈祈猫儿з 提交于 2019-11-27 19:20:58
问题 I use Spring-Data Neo4j 2.2.0-RELEASE. (my following issue would be applicable to any other kind of entity mapping, why not JPA) In my project, I have a public method annotated with @Transactional Spring's annotation, since I want to update/save an entity inside it: public class MeetingServices { private UserRepository userRepository; private MeetingRepository meetingRepository; public void setUserRepository(UserRepository userRepository) { this.userRepository = userRepository; } public void

save method of CRUDRepository is very slow?

北城余情 提交于 2019-11-27 15:36:38
问题 i want to store some data in my neo4j database. i use spring-data-neo4j for that. my code is like the follow: for (int i = 0; i < newRisks.size(); i++) { myRepository.save(newRisks.get(i)); System.out.println("saved " + newRisks.get(i).name); } My newRisks-array contains circa 60000 objects and 60000 edges. Every node and edge has one property. The duration of this loop is circa 15 - 20 minutes, is this normal? I used Java VisualVM to search some bottlenecks, but my average CPU usage was 10 -

Tests fail with a TransactionRequiredException: no transaction is in progress exception when loading both JPA and Neo4J configurations

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 07:58:24
问题 I have a JPA web application with some integration tests against the JPA repositories. There are no integration tests against the Neo4J repositories yet. Now, I have added some Neo4J functionality to this existing JPA web application. I'm this now using Neo4J repositories, alongside JPA repositories. My entities and repositories are named differently and are sitting in different packages. My tests all extend the following class: @WebAppConfiguration @RunWith(SpringJUnit4ClassRunner.class)

How do I query for paths in spring data neo4j 4?

旧巷老猫 提交于 2019-11-27 07:12:30
问题 In an earlier version of spring data neo4j (3.3.1), I was able to query for paths in my database and return them as Iterable<EntityPath<S,E>> like this: public interface ArgumentNodeRepository extends GraphRepository<ArgumentNode> { @Query("START t=node({0}), r=node({1}) MATCH p=t<-[:SUPPORTED_BY|INTERPRETS*0..]-r RETURN p") Iterable<EntityPath<ArgumentNode, ArgumentNode>> getPaths(long childId, long rootId); } I'm trying to migrate to 4.0.0 and the EntityPath class seems to have disappeared.