DATAGRAPH-443 Fix @Param annotation for derived finder methods (Add tests)
This commit is contained in:
@@ -107,6 +107,8 @@ public interface PersonRepository extends GraphRepository<Person>, NamedIndexRep
|
||||
|
||||
Iterable<Person> findByAge(int age);
|
||||
|
||||
Iterable<Person> findByAlias(@Param("alias") String alias);
|
||||
|
||||
@Query("start person=node:`name-index`('name:*') return person.name as name, person order by name asc ")
|
||||
Iterable<NameAndPersonResult> getAllNamesAndPeople();
|
||||
|
||||
|
||||
@@ -465,6 +465,12 @@ public class GraphRepositoryTests {
|
||||
assertThat(findByName, hasItem(michael));
|
||||
}
|
||||
|
||||
@Test @Transactional
|
||||
public void findByAlias() {
|
||||
Iterable<Person> findByName = personRepository.findByAlias(testTeam.michael.getAlias());
|
||||
assertThat(findByName, hasItem(testTeam.michael));
|
||||
}
|
||||
|
||||
@Test @Transactional
|
||||
public void countByName() {
|
||||
Long num = personRepository.countByName(testTeam.michael.getName());
|
||||
|
||||
Reference in New Issue
Block a user