From 5ad3d3a11899b9979966192f228db1d43642bbc9 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Wed, 19 Dec 2012 10:50:09 +0100 Subject: [PATCH] DATAGRAPH-320 Performance improvement regarding reference annotations in Neo4jMappingContext --- .../mapping/Neo4JPersistentPropertyImpl.java | 2 +- .../support/mapping/Neo4jMappingContext.java | 23 ++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4JPersistentPropertyImpl.java b/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4JPersistentPropertyImpl.java index 5532026c1..631586157 100644 --- a/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4JPersistentPropertyImpl.java +++ b/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4JPersistentPropertyImpl.java @@ -74,7 +74,7 @@ class Neo4jPersistentPropertyImpl extends AbstractPersistentProperty, Neo4jPersistentProperty> { + private final Map referenceAnnotations = new IdentityHashMap(); + protected Neo4jPersistentEntityImpl createPersistentEntity(TypeInformation typeInformation) { final Class type = typeInformation.getType(); if (type.isAnnotationPresent(NodeEntity.class)) { @@ -171,4 +170,16 @@ public class Neo4jMappingContext extends AbstractMappingContext