Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
JPARepository を使用してデータをフェッチするテーブルがたくさんあります。次に、MySql - View で作成し、JPARepository を使用して findAll を実行しようとしましたが、機能していません。
ネイティブ クエリと DTO プロジェクションを使用できます。
public interface ReportRepository extends JpaRepository<SomeEntity, Long> { @Query(nativeQuery = true, value = "SELECT * FROM yourView") List<YourDto> getDateFromYourView(); }