idea 解決報錯 or DELIMITER expected, got id等問題博客參考 SQL

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也會以上報錯。。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章