spring-data-neo4j

Neo4j Cypher delete query

梦想与她 提交于 2019-12-12 04:45:37
问题 I have a following Neo4j Cypher query for Decision entity deleting: MATCH (d:Decision) WHERE id(d) IN {decisionsIds} OPTIONAL MATCH (d)-[r]-(t) DELETE d, r WITH t, r WHERE NOT (id(t) IN {decisionsIds}) OPTIONAL MATCH (t)-[r2:VOTED_ON|:CREATED_BY|:VOTED_FOR]-() WHERE r2 <> r WITH t, r2 WHERE none(x in labels(t) WHERE x in ['User', 'Decision']) DELETE t, r2 Previously I had a Vote entity with relationships VOTED_ON and VOTED_FOR to entities Criterion and Decision . Also, Vote has relationship

spring data neo4j version issue

本秂侑毒 提交于 2019-12-12 04:05:43
问题 I am trying to use spring-data-neo4j in my grails project but there are so many version conflicting. I am using following dependency compile org.springframework.data:spring-data-neo4j-rest:3.1.2.RELEASE then if i run my neo4j server 2.1.2 then it is giving me error Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jMappingContext' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Invocation of init method failed;

Is there a way to get all the labels for a node in SDN 4.0

谁都会走 提交于 2019-12-12 03:28:29
问题 I want to get all the labels belongs to a node, if there a way to do this in one query in SDN 4.0? For example, my current repo is like Book findById(Long bookId); @Query("MATCH (n:Book) where id(n)={0} set n:AnotherLabel return n") Book updateBookLabel(Long bookId); is there anyway I can simply book.getLabels(); to retrieve all the labels for this book node. the class for book is @NodeEntity public class Book extends Something { } Yes, by default, my Book node should has two label Book and

Neo4j embedded database doesnt show the browser in a spring boot app

三世轮回 提交于 2019-12-12 03:24:01
问题 [update] Please find the config classes here : https://github.com/veeseekay/fooflix. To run, you can just do a gradle clean build java -jar build/libs/fooflix.jar When you point to localhost:8686 - gives a 404. However, I am running this within my IDE and the browser shows up fine. I have successfully embedded neo4j within my spring boot application. I could even bring up the webadmin/browser for neo4j using this : How to enable neo4j webadmin when using spring-data-neo4j? However there is a

3.3.0.M1 : Properties on RelationShipEntity not saved when using CypherRestGraphDatabase?

岁酱吖の 提交于 2019-12-12 03:22:09
问题 I've run into a snag with 3.3.0.M1 - I was much thrilled with the speed increase for the REST remoting, but it seems the relation properties aren't saved properly to the remote DB? BTW; this worked "as advertised" in 3.2.1.RELEASE :-/ I've got a JUnit test that works beautifully using an Embedded instance, but will fail to retrieve relation properties when using a remoted DB. Indeed, inspecting the database using the webconsole shows the relations have no saved properties. Obfuscated code

Cypher Search Query Fuzzy query

左心房为你撑大大i 提交于 2019-12-12 03:08:13
问题 I want to use cypher to search, I have four movie enerties, forrest, sky, sky1, sky2 I want search sky I want it returns sky, sky1, sky2 My cypher is @Query("MATCH (movie:Movie) WHERE movie.title =~ '.*{0}.*' RETURN movie") or @Query("MATCH (movie:Movie) WHERE movie.title =~ '(?i).*{0}.*' RETURN movie") Neither of those works well: it return forrest, sky,sky1, sky2 no matter what I search (forrest or sky). What is wrong? controller @RequestMapping(value = "/movies", method = RequestMethod.GET

spring-data with neo4j + mongo version conflicts

折月煮酒 提交于 2019-12-12 02:42:37
问题 In my spring application I am working with Neo4j DB via spring-data project. I want to add mongo db as another data store to my application. It seems that there some conflictions while trying to work with these two data stores together. my pom - only the relevant dependencies: <spring.version>3.1.2.RELEASE</spring.version> <spring.data.mongo.version>1.0.4.RELEASE</spring.data.mongo.version> <neo4j.version>1.8.RC1</neo4j.version> <spring-data-neo4j.version>2.1.0.RC4</spring-data-neo4j.version>

Neo4J SDN- 3.0.0 ExecutingRestAPI.getNodeById is invoced repeatedly

流过昼夜 提交于 2019-12-12 02:23:14
问题 I'm using Neo4J-2.0.1 and SDN - 3.0.0.RELEASE. I have a NodeEntity as follow: @NodeEntity public class Group { @GraphId Long id; @Indexed(unique = true, indexType = IndexType.SIMPLE) public String name; public String property1; public String property2; public Group() { } public Group(String str) { name = str; } } I have a groups repository : public interface GroupsRepository extends GraphRepository<Group> { Group getGroupByName(String name); } After the getGroupByName(...) method is invoked,

How to support Transactions in Neo4j Rest

Deadly 提交于 2019-12-12 01:56:29
问题 We build a Grails Application using the database Neo4j ,And We used Spring Data Neo4j rest , As per the requirement of any Application , it should provide the facility of Transaction . But using Neo4j When we save a Node and Exception occur in executing the code then the node is save but its relationship is not save How to resolve this problem ??? Can we use Spring Transaction Management or any other thing ??? 回答1: In the past it was a shortcoming of the Neo4j-REST APIs to not expose

spring neo4j: how can I search data by index field case insensitive?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 00:11:45
问题 Domain class as following: @NodeEntity public class Product{ private Long nodeId; @Indexed(indexName = "productCode") private String code; ... } Repository class: public interface ProductRepository extends GraphRepository<Product>{ @Query(value="start product=node:productCode(code={0}) return product") public Set<Product> findProducts(String code); } how can I make code lookup case insensitive? I try regular expression and fail.Code as following: public interface ProductRepository extends