spring-data-neo4j

Spring Data Neo4J - NotInTransactionException while modifying set of nodeEntity

て烟熏妆下的殇ゞ 提交于 2020-01-04 05:52:07
问题 We are using spring-data-neo4j with repository methods and annotated queries. Formerly, we used SDN with a rest connection to a standalone server. Performance was very poor, though, so we decided to use SDN with an embedded neo4j instance. But that does not work as expected. Here are some classes The node entity import java.util.Set; import org.codehaus.jackson.annotate.JsonIgnore; import org.neo4j.graphdb.Direction; import org.springframework.data.neo4j.annotation.Fetch; import org

Return value after deleting node or relationship in neo4j

馋奶兔 提交于 2020-01-03 18:21:52
问题 I have experienced that when I delete some node (which may have relationships) or relationship in neo4j using cypher query, it do not give anything in return like in mysql db. is there any way which can give the confirmation about the number of affected node (like number of node deleted) in cypher ? 回答1: Below query works (I have tried this with neo4j 1.8.1 and 1.9.3 both community and enterprise version) START root=node(1) MATCH root-[r:?]->() WHERE root.Id=12 DELETE r,root return count(root

Return value after deleting node or relationship in neo4j

我们两清 提交于 2020-01-03 18:21:12
问题 I have experienced that when I delete some node (which may have relationships) or relationship in neo4j using cypher query, it do not give anything in return like in mysql db. is there any way which can give the confirmation about the number of affected node (like number of node deleted) in cypher ? 回答1: Below query works (I have tried this with neo4j 1.8.1 and 1.9.3 both community and enterprise version) START root=node(1) MATCH root-[r:?]->() WHERE root.Id=12 DELETE r,root return count(root

Custom repository implementation for Neo4j doesn't work

邮差的信 提交于 2020-01-03 05:52:06
问题 This is similar to what is discussed at Unable to use two Neo4j Instances with Spring boot/Spring data neo4j but I don't have two databases. I have downloaded the spring-data neo4j sample java application from the git repo and want to execute a dynamic query instead of executing a static query via repository interface. I am facing an issue of null transaction manager. Here's my interface : public interface SearchRepositoryCustom { Iterable<Movie> searchByCriteria(); } Here's my custom repo

Errors of the Cineasts examples of Spring data neo4j

独自空忆成欢 提交于 2020-01-03 05:07:09
问题 I imported the cineast maven project to eclipse, but I face a configuration problem... cvc-complex-type.4: Attribute 'base-package' must appear on element 'neo4j:config' Below are the configuration files which have this error. ApplicationContext.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:neo4j="http

Errors of the Cineasts examples of Spring data neo4j

亡梦爱人 提交于 2020-01-03 05:07:04
问题 I imported the cineast maven project to eclipse, but I face a configuration problem... cvc-complex-type.4: Attribute 'base-package' must appear on element 'neo4j:config' Below are the configuration files which have this error. ApplicationContext.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:neo4j="http

how to store location and time stamp data using Neo4j

无人久伴 提交于 2020-01-03 02:53:12
问题 how to store location and time stamp data generated by the buses every 2 minutes on different routes using Neo4j. Route 1 : A-> B-> C-> D-> C-> B-> A [route created in neo4j] how to achieve below time-stamp storing? 8:01 8:10 8:25 9:10 9:xx xxx xxx x:x xx:xx xx:xx xx:x x:x X:X Route 2: G-> G-> H-> I-> J-> K-> L 10:01 10:10 10:25 11:10 12:xx xxx x:x xx:xx xx:xx xx:x x:x X:X In rdbms, i store the time with each bustop as column id. How to do this neo4j. Stuck with my college project, any help

Unable to find neo4j-cypher-dsl version 1.9.M04 anywhere

佐手、 提交于 2020-01-02 22:07:09
问题 org.springframework.data:spring-data-neo4j:2.2.1.RELEASE depends on neo4j-cypher-dsl:org.neo4j:1.9.M04 but I am unable to find this dsl artifact in any public mvn repositories. Any idea on where to get this jar? 回答1: Found this in neo4j repo here http://m2.neo4j.org/content/repositories/releases/org/neo4j/neo4j-cypher-dsl/1.9.M04/ 来源: https://stackoverflow.com/questions/16653128/unable-to-find-neo4j-cypher-dsl-version-1-9-m04-anywhere

Spring Data Neo4j Pageable

自古美人都是妖i 提交于 2020-01-02 07:15:19
问题 I have a Spring Data Repository interface that gets a collection of nodes from by database using a custom query: Repository Method: @Query ("START r = node({0}) MATCH r <-[:AUTHOR]- m RETURN m") public Page<Object> findObjectById (long objectId,Pageable pageable); Method call custRepository.findObjectById (4,new PageRequest(0, 5)); This return a collection of Objects, however the Page information is incorrect. There is enough data in database for me to get several pages of data. The first

Delete all relations and connected nodes in Neo4j for a user

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 16:37:24
问题 We have selected neo4j as the DB for our web application. The user has a large number of relations and connected nodes. As of now there are about 20 relations for a user. One of the features is a newsfeed feature. If i want to delete a user completely, is the cypher query the best way to delete or is there any other alternative? Since we are still planning to add new features, the relationships and nodes connected to the user also will increase. So if we use cypher query, the query has to be