package org.example.seed.repository;

import org.example.seed.entity.ChefEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Repository;

import java.util.concurrent.Future;

/**
 * Created by PINA on 25/06/2017.
 */
@Repository
public interface ChefRepository extends JpaRepository<ChefEntity, String> {

    @Async
    @Query("SELECT ce FROM ChefEntity ce JOIN ce.telephones")
    Future<Page<ChefEntity>> findAllWithTelephones(final Pageable pageable);
}

@@ -110,240 +110,36 @@
 ata.
-domain.Page;%0Aimport org.springframework.data.domain.Pageable;%0Aimport org.springframework.data.jpa.repository.JpaRepository;%0Aimport org.springframework.data.jpa.repository.Query;%0Aimport org.springframework.scheduling.annotation.Async
+jpa.repository.JpaRepository
 ;%0Aim
@@ -191,45 +191,8 @@
 y;%0A%0A
-import java.util.concurrent.Future;%0A%0A
 /**%0A
@@ -241,16 +241,16 @@
 ository%0A
+
 public i
@@ -320,158 +320,7 @@
 g%3E %7B
-%0A%0A    @Async%0A    @Query(%22SELECT ce FROM ChefEntity ce JOIN ce.telephones%22)%0A    Future%3CPage%3CChefEntity%3E%3E findAllWithTelephones(final Pageable pageable);
 %0A%7D%0A

remove new implemented method