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也会以上报错。。

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