neo4j-ogm

Spring Data Neo4j 4returning cached results?

丶灬走出姿态 提交于 2019-12-24 00:03:43
问题 I'm not sure if this is a Neo4j question or a Spring Data question. I'm fairly new to Neo4j, so I just want to make sure I'm doing things right. I'm using spring-data-neo4j:4.0.0.RELEASE with a neo4j-community-2.3.1 DB instance. The situation is that I am getting more nodes that I'm expecting back from DB queries. If I create a graph consisting of 3 different types of nodes: (NodeA)-[:NodeAIncludesNodeB]->(NodeB)-[:NodeBIncludesNodeC]->(NodeC) and then I run a query to get a single NodeA node

Neo4j OGM how to delete relationship

南笙酒味 提交于 2019-12-23 05:41:15
问题 I have two neo4j-OGM node entities connected with property-less relationship like so: @NodeEntity public class User { @Relationship(type = RelationshipNames.USER_DEVICES, direction = Relationship.UNDIRECTED) private Set<Device> devices; } @NodeEntity public class Device { @Relationship(type = RelationshipNames.USER_DEVICES, direction = Relationship.UNDIRECTED) private User user; } When I add a device to a user and then perform save, i get this graph: Later on, when i both remove the device

Neo4j OGM how to delete relationship

本秂侑毒 提交于 2019-12-23 05:41:15
问题 I have two neo4j-OGM node entities connected with property-less relationship like so: @NodeEntity public class User { @Relationship(type = RelationshipNames.USER_DEVICES, direction = Relationship.UNDIRECTED) private Set<Device> devices; } @NodeEntity public class Device { @Relationship(type = RelationshipNames.USER_DEVICES, direction = Relationship.UNDIRECTED) private User user; } When I add a device to a user and then perform save, i get this graph: Later on, when i both remove the device

SDN4/OGM Cypher query and duplicates at Result

和自甴很熟 提交于 2019-12-23 03:24:07
问题 I have a following Cypher query: MATCH (parentD)-[:CONTAINS]->(childD:Decision) WHERE parentD.id = 1 OPTIONAL MATCH (childD)-[sortValue1:HAS_VALUE_ON]->(sortCharacteristic1:Characteristic) WHERE sortCharacteristic1.id = 1 WITH * MATCH (childD)-[ru:CREATED_BY]->(u:User) OPTIONAL MATCH (childD)-[rup:UPDATED_BY]->(up:User) WITH ru, u, rup, up, childD , sortValue1 ORDER BY sortValue1.value ASC SKIP 0 LIMIT 100 RETURN ru, u, rup, up, childD AS decision, [ (parentD)<-[:DEFINED_BY]-(entity)<-[

Neo4j 3.0 and spring data

徘徊边缘 提交于 2019-12-22 11:09:06
问题 I would like to use the new bolt protocol to connect my spring application to neo4j 3.0 database. Is bolt protocol already implemented in spring data? 回答1: Yes, these versions support Bolt: Neo4j OGM 2.0.2, which can be used with SDN 4.1.1.RELEASE (you will need to explicitly include this Neo4j OGM version). Or the current SDN snapshot 4.2.0.BUILD-SNAPSHOT which depends on the latest Neo4j OGM snapshot. The Bolt Driver dependency is also required: <dependency> <groupId>org.neo4j</groupId>

Spring boot 2.0 neo4j ogm 3.0 compatible jetty version

核能气质少年 提交于 2019-12-22 10:56:30
问题 I'm trying to upgrade spring boot from 1.5 to 2.0 and facing issue with jetty version. I'm new to neo4j ogm and spring boot. When I try to run a test case it fails with below error. java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionManager at org.neo4j.server.CommunityNeoServer.createWebServer(CommunityNeoServer.java:90) at org.neo4j.server.AbstractNeoServer.init(AbstractNeoServer.java:188) at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:204) at org.neo4j

Depth in custom Cypher queries with OGM always 0?

邮差的信 提交于 2019-12-21 05:04:33
问题 I'm currently evaluating OGM / Spring Data Neo4j for a use case and came upon the following problem: When executing a custom Cypher query either via Spring Data @Query annotation or directly via the Neo4j Session , the result contains only the nodes directly queried for and not the related nodes (relationships are null in the resulting node objects). I.e. the depth for these queries seems to be 0 and not 1, as I would have expected from the docs. How can I execute a custom Cypher query via

Neo4j OGM example with Scala

本秂侑毒 提交于 2019-12-12 12:06:54
问题 I tried the example mentioned in Luanne's article The essence of Spring Data Neo4j 4 in Scala. The code can be found in the neo4j-ogm-scala repository. package neo4j.ogm.scala.domain import org.neo4j.ogm.annotation.GraphId; import scala.beans.BeanProperty import org.neo4j.ogm.annotation.NodeEntity import org.neo4j.ogm.annotation.Relationship import org.neo4j.ogm.session.Session; import org.neo4j.ogm.session.SessionFactory; abstract class Entity { @GraphId @BeanProperty var id: Long = _

Neo4j-Ogm for dynamic domain object model

时光怂恿深爱的人放手 提交于 2019-12-12 06:06:52
问题 I've started to use Neo4j-ogm inside my application and it works like charm for fixed object domain model. When I know which node type connected to another node with known type - it can be easily mapped. However, in my opinion versitality of Neo4j graph database is also in an ability to work with un-typed (or dynamic) domain models and I'm having conceptual problem to understand how to achieve it with Neo4j-ogm. Let me describe my problem with an example. I have domain objects like: Message

Neo4j SDN4 OGM AmbiguousBaseClassException

人走茶凉 提交于 2019-12-12 05:38:22
问题 I am running into an issue wherein some of my Neo4J queries like the one below ends up in an OGM AmbiguousBaseClassException while others don't. For example findByTitle for the movie "The Score" throws an exception but "The Matrix" does not. My graph is populated by the Movie Database found at https://neo4j.com/developer/example-data/ I am unable to find an explanation to the above observation and I hope someone can help. curl http://localhost:8080/movies/search/findByTitle?title=The%20Score