fixed bug, with returning the wrong state from useOrCreateState

This commit is contained in:
Michael Hunger
2011-10-13 21:49:00 +02:00
parent 86aa8e97b4
commit adca8458d2

View File

@@ -106,7 +106,7 @@ public class EntityStateHandler {
public <S extends PropertyContainer> S useOrCreateState(Object entity, S state) {
if (state != null) return state;
final S containedState = getPersistentState(entity);
if (containedState == null) return containedState;
if (containedState != null) return containedState;
final Class<?> type = entity.getClass();
final Neo4jPersistentEntityImpl<?> persistentEntity = mappingContext.getPersistentEntity(type);
if (persistentEntity.isNodeEntity()) {