diff --git a/spring-data-graph-parent/pom.xml b/spring-data-graph-parent/pom.xml index a940c4d07..96c265e50 100644 --- a/spring-data-graph-parent/pom.xml +++ b/spring-data-graph-parent/pom.xml @@ -17,7 +17,7 @@ 3.0.5.RELEASE 1.0.0.RELEASE 1.3 - 1.6.11.RELEASE + 1.6.12.BUILD-SNAPSHOT diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/graph/neo4j/Attribute.java b/spring-data-neo4j/src/test/java/org/springframework/data/graph/neo4j/Attribute.java new file mode 100644 index 000000000..c69ac3b85 --- /dev/null +++ b/spring-data-neo4j/src/test/java/org/springframework/data/graph/neo4j/Attribute.java @@ -0,0 +1,38 @@ +/** + * Copyright 2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.data.graph.neo4j; + +import org.springframework.data.graph.annotation.NodeEntity; +import org.springframework.data.graph.neo4j.annotation.Indexed; + +/** + * @author mh + * @since 27.04.11 + */ +@NodeEntity +public class Attribute { + @Indexed + T value; + + public T getValue() { + return value; + } + + public void setValue(T value) { + this.value = value; + } +} diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/graph/neo4j/support/NodeEntityTest.java b/spring-data-neo4j/src/test/java/org/springframework/data/graph/neo4j/support/NodeEntityTest.java index f836d0191..e981e2b68 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/graph/neo4j/support/NodeEntityTest.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/graph/neo4j/support/NodeEntityTest.java @@ -24,6 +24,7 @@ import org.junit.runner.RunWith; import org.neo4j.graphdb.NotFoundException; import org.neo4j.graphdb.Transaction; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.graph.neo4j.Attribute; import org.springframework.data.graph.neo4j.Group; import org.springframework.data.graph.neo4j.Person; import org.springframework.data.graph.neo4j.PersonRepository; @@ -134,4 +135,10 @@ import static org.springframework.data.graph.neo4j.Person.persistedPerson; Assert.assertNull("node deleted " + id, graphDatabaseContext.getNodeById(id)); } + @Test + public void testPersistGenericEntity() { + final Attribute attribute = new Attribute(); + attribute.setValue("test"); + attribute.persist(); + } }