Merge branch 'master' of github.com:SpringSource/spring-data-graph
This commit is contained in:
116
README.textile
116
README.textile
@@ -6,70 +6,78 @@ The Spring Data Graph project provides a simplified POJO based programming model
|
||||
|
||||
h2. Maven configuration
|
||||
|
||||
* Add the maven repository and dependency
|
||||
* Add the maven repository and dependency:
|
||||
|
||||
<pre>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-neo4j</artifactId>
|
||||
<version>1.0.0.RELEASE</version>
|
||||
</dependency>
|
||||
<repository>
|
||||
<id>spring-maven-snapshot</id>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
<name>Springframework Maven MILESTONE Repository</name>
|
||||
<url>http://maven.springframework.org/milestone</url>
|
||||
</repository>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-neo4j</artifactId>
|
||||
<version>1.0.0.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-maven-snapshot</id>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
<name>Springframework Maven MILESTONE Repository</name>
|
||||
<url>http://maven.springframework.org/milestone</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</pre>
|
||||
|
||||
* Configure AspectJ: Add the following plugin XML to your project's <plugins> config in pom.xml to hook AspectJ into the build process:
|
||||
* Configure AspectJ: Include the following plugin XML in your pom.xml to hook AspectJ into the build process:
|
||||
|
||||
<pre>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<configuration>
|
||||
<outxml>true</outxml>
|
||||
<aspectLibraries>
|
||||
<aspectLibrary>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aspects</artifactId>
|
||||
</aspectLibrary>
|
||||
<aspectLibrary>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-neo4j</artifactId>
|
||||
</aspectLibrary>
|
||||
</aspectLibraries>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
<version>1.6.11.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjtools</artifactId>
|
||||
<version>1.6.11.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<configuration>
|
||||
<outxml>true</outxml>
|
||||
<aspectLibraries>
|
||||
<aspectLibrary>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aspects</artifactId>
|
||||
</aspectLibrary>
|
||||
<aspectLibrary>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-neo4j</artifactId>
|
||||
</aspectLibrary>
|
||||
</aspectLibraries>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
<version>1.6.11.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjtools</artifactId>
|
||||
<version>1.6.11.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</pre>
|
||||
|
||||
h2. Spring configuration
|
||||
|
||||
* Configure Spring Data Graph for Neo4j in your application using the provided xml namespace.
|
||||
* Configure Spring Data Graph for Neo4j in your application using the provided XML namespace:
|
||||
|
||||
<pre>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
9
pom.xml
9
pom.xml
@@ -122,6 +122,10 @@
|
||||
<id>spring-site-staging</id>
|
||||
<url>file:///${java.io.tmpdir}/spring-data/data-graph/docs/${project.version}</url>
|
||||
</site>
|
||||
<!-- <repository>
|
||||
<id>spring-release-staging</id>
|
||||
<url>file:///${java.io.tmpdir}/spring-data/data-graph/release</url>
|
||||
</repository> -->
|
||||
<repository>
|
||||
<id>spring-milestone-staging</id>
|
||||
<url>file:///${java.io.tmpdir}/spring-data/data-graph/milestone</url>
|
||||
@@ -140,6 +144,11 @@
|
||||
<id>static.springframework.org</id>
|
||||
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-data/data-graph/snapshot-site/</url>
|
||||
</site>
|
||||
<!-- <repository>
|
||||
<id>spring-release</id>
|
||||
<name>Spring Release Repository</name>
|
||||
<url>s3://maven.springframework.org/release</url>
|
||||
</repository> -->
|
||||
<repository>
|
||||
<id>spring-milestone</id>
|
||||
<name>Spring Milestone Repository</name>
|
||||
|
||||
@@ -60,10 +60,19 @@ public class Actor {
|
||||
relationship of a given type between any two given entities.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Before an entity has been attached with <code>persist()</code> for the first time, it will
|
||||
not have its state managed by Spring Data Graph. For example, given the Actor class defined above,
|
||||
if <code>actor.movies</code> was accessed in a non-persisted entity, it would return
|
||||
<code>null</code>, whereas if it was accessed in a persisted entity, it would return
|
||||
an empty managed set.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
By setting direction to BOTH, relationships are created in the outgoing direction, but when the
|
||||
1:N field is read, it will include relationships in both directions. A cardinality of M:N is
|
||||
not necessary because relationships can be navigated in both directions.
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
The relationships can also be accessed by using the aspect-introduced methods
|
||||
<code>entity.getRelationshipTo(target, type)</code> and
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@IMPORT url("highlight.css");
|
||||
|
||||
body {
|
||||
text-align: justify;
|
||||
margin-right: 2em;
|
||||
|
||||
Reference in New Issue
Block a user