Spring JPA Repository返回对象

时间:2016-05-17 04:31:27

标签: java spring jpa repository

我是春天的新人。我想创建一个返回对象数组页面的存储库,如下所示:

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;

public interface A extends JpaRepository<Object, Long> {

    @Query("SELECT a, b FROM EntityA a FULL OUTER JOIN EntityB b ON "
            + "a.id = b.id")
    Page<Object[]> findAll(Pageable pageable);
}

但我明白了:

nested exception is java.lang.IllegalArgumentException: Not an managed type: class java.lang.Object

谢谢

0 个答案:

没有答案