forgot to add the new isPropertyType to the around-get advice

This commit is contained in:
Michael Hunger
2010-08-15 18:52:15 +02:00
parent 0af2ead565
commit 2cb976cd90
2 changed files with 2 additions and 1 deletions

View File

@@ -124,7 +124,7 @@ public aspect Neo4jNodeBacking extends AbstractTypeAnnotatingMixinFields<GraphEn
Field f = fieldSignature.getField();
// TODO fix arrays, TODO serialize other types as byte[] or string (for indexing, querying) via Annotation
if (f.getType().isPrimitive() || f.getType().equals(String.class)) {
if (isPropertyType(f.getType())) {
String propName = getNeo4jPropertyName(f);
log.info("GET " + f + " <- Neo4J simple node property [" + propName + "]");
return entity.getUnderlyingNode().getProperty(propName, null);

View File

@@ -70,6 +70,7 @@ public class Neo4jGraphPersistenceTest {
Assert.assertEquals("Michael", p.getUnderlyingNode().getProperty("Person.name"));
Assert.assertEquals(35, p.getUnderlyingNode().getProperty("Person.age"));
Assert.assertEquals((short)182, p.getUnderlyingNode().getProperty("Person.height"));
Assert.assertEquals((short)182, (short)p.getHeight());
}
@Test