Почему бы не пойти на более простое решение, используя boost
using namespace boost::gregorian;
using namespace boost::posix_time;
ptime pt = time_from_string("20150917");
Проблема в том, что если один из узлов пути не обладает свойством name
, то вся проверка не будет пройдена.
Так или же мы проверяем на наличие свойства :
match p=allShortestPaths((n)-[*]-(m))
where
n.title = 'The Replacements' and
m.title = 'Speed Racer' and
NONE(n in nodes(p) where EXISTS(n.name) and n.name = "Keanu Reeves")
return p
Или используем функцию COALESCE
:
match p=allShortestPaths((n)-[*]-(m))
where
n.title = 'The Replacements' and
m.title = 'Speed Racer' and
NONE(n in nodes(p) where COALESCE(n.name, '') = "Keanu Reeves")
return p