spring-data-neo4j

Unexpected null value,neo4j

白昼怎懂夜的黑 提交于 2019-12-08 04:43:15
问题 I don't know why I can't get the value of the movie fields. I debugged it and I found the movie is null. I post a picture and you will see it . Please give me some advice. I am sure I had created the relationship successfully, may somewhere wrong with recommendation. Class or cypher? public interface MovieRepository extends GraphRepository<Movie> { @Query("match (user:User {login: {0}})-[r:RATED]->(movie)<-[r2:RATED]-(other)-[r3:RATED]->(otherMovie) " + " where r.stars >= 3 and r2.stars >= r

neo4j : Cannot perform data updates in a transaction that has performed schema updates

☆樱花仙子☆ 提交于 2019-12-08 02:14:57
问题 Hi I am getting following error while saving NodeEntity object by using Neo4jTemplate Cannot perform data updates in a transaction that has performed schema updates Spring-data :- <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> <version>3.1.0.BUILD-SNAPSHOT</version> Neo4j Version : 2.X Service :- @Override @Transactional public void addRepository(Repository repository) { template.save(repository); } Caused by: org.neo4j.kernel.api.exceptions

Neo4j slow creation method [closed]

♀尐吖头ヾ 提交于 2019-12-07 17:58:48
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . In my Neo4j/Neo4j Spring Data application I have a following entities: VoteGroup contains relationships VOTED_ON and VOTED_FOR to entities Criterion and Decision and list of Vote @NodeEntity public class VoteGroup extends BaseEntity { private static final String VOTED_ON = "VOTED_ON"; private final static String

@Query shortestPath return type in Spring Data Neo4j

此生再无相见时 提交于 2019-12-07 14:42:08
问题 What's the return Type of the following query and how do I use it? I tried several things like Path , Iterable<Path> , and others but I always hit some sort of exceptions. It seems to be a LinkedHashMap but are there any other handier object types that I can use? @Query( "START u1=node:User(key= {0}), u2=node:User(key = {1}) " + "MATCH p = shortestPath(u1-[*]-u2) " + "RETURN p") public ??? findShortestPath(String u1, String u2); Am I missing any dependencies? This is the only one that I'm

neo4j - Relationship between three nodes

旧巷老猫 提交于 2019-12-07 13:51:04
问题 I'm totally new to Neo4j and I'm testing it in these days. One issue I have with it is how to correctly implement a relationship which involves 3 different nodes using Spring Data . Suppose, for example, that I have 3 @NodeEntity s: User , Tag and TaggableObject . As you can argue, a User can add a Tag to a TaggableObject ; I model this operation with a @RelationshipEntity TaggingOperation . However, I can't find a simple way to glue the 3 entities inside the relationship. I mean, the obvious

LocalDateTime is not converted to String but to Json object

懵懂的女人 提交于 2019-12-07 13:22:42
问题 I want to serialize a creation date of type java.time.LocalDateTime as String, when calling a spring-data-rest service. The field of the entity is annotated with DateTimeFormat(iso=ISO.DATE_TIME). I also registered a LocalData to String Converter in the Spring Configuration class. @Override @Bean protected ConversionService neo4jConversionService() throws Exception { ConversionService conversionService = super.neo4jConversionService(); ConverterRegistry registry = (ConverterRegistry)

How can I use the webadmin interface with an embedded Neo4j 2.0 instance?

点点圈 提交于 2019-12-07 05:08:17
问题 I have a project which has been running with an embedded Neo4j 1.8.2 plus web admin interface. Now I updated the project to run with the latest Neo4j 2.0.1. Although there were some obstacles during that course (as I'm utilizing Spring Data Neo4j) in the end everything went smooth. But currently I'm stuck in getting the web admin running with it. Any advise would be highly appreciated. Here's my config which I was using for the 1.8 version (class for configuration referenced in the snippets)

How to check array property in neo4j?

浪尽此生 提交于 2019-12-07 02:28:37
问题 How to search node using cypher query where one of the node property having array of string ? e.g. members-- > ["abc","xyz","pqr"] . I can find the node by keeping order of array elements in same manner, for e.g. START root=node(*) where has(root.members) and root.members=["abc","xyz","pqr"] return root; but How to search node if I do not / cannot provide the exact order of elements as they are in node property ? 回答1: Use the "all" predicate to ensure every element in the root.member is in

Naming convention for bidirectional relationships in Neo4j (using Spring Data)

感情迁移 提交于 2019-12-06 15:58:37
I need some advice to give name to relationships. Plus, I'm not sure on how I have to annotate my domain entities with spring data. Most of examples that I've seen are unidirectional and the name chosen are pretty straightforward. Supose the following example: @NodeEntity public class Person { @Indexed private String name; @RelatedTo(type="OWNS", direction=Direction.OUTGOING) private Set<Car> cars; } The relationship name seems ok, no problem. Now suppose that I want to make this relationship bidirectional. What are the differences (and the pros/cons) of the following approaches. 1) Make both

neo4j : Cannot perform data updates in a transaction that has performed schema updates

我与影子孤独终老i 提交于 2019-12-06 15:23:56
Hi I am getting following error while saving NodeEntity object by using Neo4jTemplate Cannot perform data updates in a transaction that has performed schema updates Spring-data :- <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> <version>3.1.0.BUILD-SNAPSHOT</version> Neo4j Version : 2.X Service :- @Override @Transactional public void addRepository(Repository repository) { template.save(repository); } Caused by: org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException: Cannot perform data updates in a transaction that has performed schema