0
0

More than 3 years have passed since last update.

JPQLでQueryにSQL書いたらエラー

Last updated at Posted at 2021-03-14

環境

spring-boot
JPQL

経緯

SpringSecurityの勉強でForm認証したかったのでPostgresSQLからデータを引っ張ってきたのだけど、Spring-boot起動時エラー

エラー内容

[table_name] not mapped

対応方法

    @Query("select n from [XXX] n where user_id = :value")
    List<Name> findByUserId(@Param("value") String value);

[XXX]のところは実際のテーブル名でなく、Entityのクラス名でした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0