Fixed the behavior. Now works for both aspects and no-aspects.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user