Database Reference
In-Depth Information
endingnodeofthe HAS_SEEN relationship(whichyouknowrepresentsamovie)andstore
it in the local Set variable moviesFriendsLike , which represents your result
.
Finally, you print the result to the console
. You should see something like the follow-
ing:
Found movie: Fargo
Found movie: Alien
Found movie: Heat
Obviously, there's something wrong. Although all three movies have been seen by John's
friends ( Fargo and Alien by Jack and Heat by Kate), Fargo should not have been listed
because John has seen it!
You have to make sure you remove the movies that John has seen from the list before you
print it on the screen. To do that, you need to find all movies that John has seen (just as
youdidin section 4.1.2 )andremovethemfromtheresult.Thecodeinthefollowinglisting
shows one way to do this.
Search WWH ::




Custom Search