https://www.jianshu.com/p/e20eb9645ce9?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation - [Editor]Idea常見問題整理
https://blog.csdn.net/gaotiedun1/article/details/89319104 - 使用IDEA開發Mybatis在編寫mapper文件出現 expected, got'***' 錯誤
最後想說一句,有些報錯以上的博客都沒有解決。。
/**
* 查詢最新更新的小說
*
* @param pageable
* @return
*/
@Query(value = "select chapter.novelId as novelId, chapter.chapterId as chapterId, chapter.chapterName as lastChapterName, chapter.createdDate as createdDate, " +
"novel.cover as cover, novel.novelName as novelName, novel.universeId as universeId, novel.universeName as universeName, " +
"author.pseudonym as pseudonym, author.headImage as headImage from NovelChapter chapter left join Novel novel on chapter.novelId=novel.novelId " +
"left join Author author on chapter.authorId=author.authorId " +
"where novel.status = 1 and chapter.status=1 and novel.isDelete=0 and novel.isFrozen=false " +
"group by chapter.novelId order by chapter.createdDate DESC limit 1", nativeQuery = true)
Page<Map> findLatestUpdateNovel(Pageable pageable);
例如JPA中,如果漏寫了value,nativeQuery也會以上報錯。。