From 2af7297d4dfebfbf0117a4f53af8f7b01877ce8c Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Tue, 9 Feb 2016 05:36:29 +0100 Subject: [PATCH] DATAGRAPH-823 - Switch master branch to SDN 4.x. Fixed typos. --- README.adoc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.adoc b/README.adoc index 7456d1950..d63a63a24 100644 --- a/README.adoc +++ b/README.adoc @@ -95,14 +95,14 @@ It supports: [source,java] ---- @Configuration -@EnableNeo4jRepositories(basePackages = "org.neo4j.example.repository") +@EnableNeo4jRepositories(basePackages = "com.example.person.repository",...) @EnableTransactionManagement public class MyConfiguration extends Neo4jConfiguration { @Bean public SessionFactory getSessionFactory() { // with domain entity base package(s) - return new SessionFactory("org.neo4j.example.domain"); + return new SessionFactory("com.example.person.domain",...); } // needed for session in view in web-applications @@ -134,6 +134,8 @@ The application can be configured programmatically as well, please http://docs.s [source,java] ---- +package com.example.person.domain; + @NodeEntity class Person { private Long id; @@ -156,15 +158,19 @@ The complete functionality is covered in the http://docs.spring.io/spring-data/d [source,java] ---- +package com.example.person.repository; + public interface PersonRepository extends GraphRepository { // derived finder method Person findByName(String name); - @Query("MATCH (:Company)<-[:WORKS_AT]-(p:Person) WHERE id(c) = {company} RETURN p") + @Query("MATCH (c:Company)<-[:WORKS_AT]-(p:Person) WHERE id(c) = {company} RETURN p") List findEmployees(Company company); } +package com.example.person.service; + @Service @Transactional public class EmployeeService { @@ -214,4 +220,4 @@ Here are some ways for you to get involved in the community: * Get involved with Spring Data Neo4j community on the http://groups.google.com/group/neo4j[Neo4j Google Group] and by helping on http://stackoverflow.com/questions/tagged/spring-data-neo4j[StackOverflow]. * Create https://jira.springframework.org/browse/DATAGRAPH[JIRA] tickets for bugs and new features and comment and vote on the ones that you are interested in. * Github is for social coding: if you want to write code, we encourage contributions through *pull requests* from a fork of this repository. - If you want to contribute code this way, please read the https://github.com/spring-projects/spring-data-build/blob/master/CONTRIBUTING.adoc[contribution guidelines] for details. \ No newline at end of file + If you want to contribute code this way, please read the https://github.com/spring-projects/spring-data-build/blob/master/CONTRIBUTING.adoc[contribution guidelines] for details.