org.springframework.dao.InvalidDataAccessResourceUsageException: Cypher execution failed with code 'Neo.ClientError.Statement.SyntaxError': Unknown function 'date' (line 1, column 160 (offset: 159))
org.springframework.dao.InvalidDataAccessResourceUsageException: Cypher execution failed with code 'Neo.ClientError.Statement.SyntaxError': Unknown function 'date' (line 1, column 188 (offset: 187))
"MATCH (cm:CrewMember {employeeId:{employeeId}}) OPTIONAL MATCH (cm)-[as:ASSIGNED_TO]-(tc:Crew {AuthorizationId:{authorizationId}}) WITH cm, tc WHERE tc.AuthorizationDate = date("2020-02-19") RETURN *"
^.; nested exception is org.neo4j.ogm.exception.CypherException: Cypher execution failed with code 'Neo.ClientError.Statement.SyntaxError': Unknown function 'date' (line 1, column 188 (offset: 187))
"MATCH (cm:CrewMember {employeeId:{employeeId}}) OPTIONAL MATCH (cm)-[as:ASSIGNED_TO]-(tc:Crew {AuthorizationId:{authorizationId}}) WITH cm, tc WHERE tc.AuthorizationDate = date({year: {year}, month: {month}, day: {day}}) RETURN *"
I connected to a neo4j instance via docker and the query ran fine, however, embedded neo4j seems to be missing the function, or maybe a configuration setting or version?
<springBootVersion>2.1.5.RELEASE</springBootVersion>
<neo4j-ogm.version>3.1.9</neo4j-ogm.version>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-embedded-driver</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.neo4j.test</groupId>
<artifactId>neo4j-harness</artifactId>
<version>${neo4j-ogm.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-bolt-driver</artifactId>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-http-driver</artifactId>
<version>3.1.9</version>
</dependency>