Skip to content

Neo4jQueryMethod checks whether a method belongs to a CypherDSL statement executor or not are to weak. #2261

Closed
@meistermeier

Description

@meistermeier
@Test
void testPartTreeInStatementExecutor(@Autowired PersonRepository repository) {
	assertThat(repository.findByFirstName("A")).isNotNull();
}

with

interface PersonRepository extends
		Neo4jRepository<Person, Long>,
		CypherdslStatementExecutor<Person> {

	Person findByFirstName(String firstName);
}

throws

java.lang.IllegalArgumentException: The first parameter to a Cypher based method must be a statement. Object of class [java.lang.String] must be an instance of interface org.neo4j.cypherdsl.core.Statement

at CypherdslBasedQuery:80

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions