Fixed the behavior. Now works for both aspects and no-aspects.

This commit is contained in:
Andrey
2012-06-02 22:28:08 +04:00
parent 1e84418f92
commit 7b131f6317
2 changed files with 2 additions and 4 deletions

View File

@@ -24,7 +24,6 @@ public class GalaxyService {
World mars = resolveWorld("Mars", 2);
mars.addRocketRouteTo(earth);
worldRepository.save(mars);
/*worldRepository.save(earth);*/
resolveWorld("Jupiter", 63);
resolveWorld("Saturn", 62);
@@ -43,7 +42,7 @@ public class GalaxyService {
World createdWorld = worldRepository.findByPropertyValue("name", name);
if (createdWorld == null) {
createdWorld = new World(name, moons);
createdWorld = worldRepository.save(createdWorld);
createdWorld = worldRepository.save(createdWorld);
}
return createdWorld;

View File

@@ -6,7 +6,6 @@ import org.springframework.data.neo4j.annotation.GraphId;
import org.springframework.data.neo4j.annotation.Indexed;
import org.springframework.data.neo4j.annotation.NodeEntity;
import org.springframework.data.neo4j.annotation.RelatedTo;
import java.util.HashSet;
import java.util.Set;
@NodeEntity
@@ -21,7 +20,7 @@ public class World {
@Fetch
@RelatedTo(type = RelationshipTypes.REACHABLE_BY_ROCKET, direction = Direction.BOTH)
private Set<World> reachableByRocket = new HashSet<World>();
private Set<World> reachableByRocket;
public World(String name, int moons) {
this.name = name;