我尝试使用以下结构部分实现存储库:
public interface ExampleCustomRepository {
Iterable<Example> findExamplesByUserId(Long id);
}
@Repository
@Transactional
public class ExampleCustomRepositoryImpl implements ExampleCustomRepository {
@Autowired
private Neo4jTemplate template;
@Override
public Iterable<Example> findExamplesByUserId(final Long id) {
// implementation
}
}
public interface ExampleRepository extends GraphRepository<Example>, ExampleCustomRepository {
}
出于某种原因,RepositoryFactory
想要为此实施的方法创建DerivedGraphRepositoryQuery
,并失败:
org.springframework.data.mapping.PropertyReferenceException: No property userId found for type Example!
是否可以使用SDN4部分实现存储库?如果是的话,我做错了什么?