Since spring-data-neo4j 6.0 the @Depth annotation for query methods was removed (DATAGRAPH-1333, commit).
How would one migrate existing 5.3 code which uses the annotation to 6.0? There is no mention of it in the migration guide.
Example usage, documented in the 5.3.6.RELEASE reference:
public interface MovieRepo extends Neo4jRepository<Movie, Long> {
@Depth(1) // Default, load simple properties and its immediately-related objects
Optional<Movie> findById(Long id);
@Depth(0) // Load simple properties only
Optional<Movie> findByProperty1(String property1);
@Depth(2) // Load simple properties, immediately-related objects and their immediately-related objects
Optional<Movie> findByProperty2(String property2);
@Depth(-1) // Load whole relationship graph
Optional<Movie> findByProperty3(String property3);
}
Are custom queries the only option or is there a replacement?