renamed getId to getNodeId
This commit is contained in:
@@ -131,7 +131,7 @@ public aspect Neo4jNodeBacking extends AbstractTypeAnnotatingMixinFields<GraphEn
|
||||
return this.underlyingNode.createRelationshipTo(nb.getUnderlyingNode(), type);
|
||||
}
|
||||
|
||||
public Long NodeBacked.getId() {
|
||||
public Long NodeBacked.getNodeId() {
|
||||
if (!hasUnderlyingNode()) return null;
|
||||
return underlyingNode.getId();
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class Neo4jGraphPersistenceTest {
|
||||
Person p = new Person("Rod", 39);
|
||||
Assert.assertEquals(p.getName(), p.getUnderlyingNode().getProperty("Person.name"));
|
||||
Assert.assertEquals(p.getAge(), p.getUnderlyingNode().getProperty("Person.age"));
|
||||
Person found = graphEntityInstantiator.createEntityFromState(graphDatabaseService.getNodeById(p.getId()), Person.class);
|
||||
Person found = graphEntityInstantiator.createEntityFromState(graphDatabaseService.getNodeById(p.getNodeId()), Person.class);
|
||||
Assert.assertEquals("Rod", found.getUnderlyingNode().getProperty("Person.name"));
|
||||
Assert.assertEquals(39, found.getUnderlyingNode().getProperty("Person.age"));
|
||||
}
|
||||
@@ -297,7 +297,7 @@ public class Neo4jGraphPersistenceTest {
|
||||
public void testFinderFindById() {
|
||||
Person p = new Person("Michael", 35);
|
||||
Finder<Person> finder = finderFactory.getFinderForClass(Person.class);
|
||||
Person pById = finder.findById(p.getId());
|
||||
Person pById = finder.findById(p.getNodeId());
|
||||
Assert.assertEquals(p, pById);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user