工作中遇到的问题--JPA 一对多查询

/**
     *  order by gs.updateDate desc     
     *  SELECT gs FROM GoodStatus gs WHERE gs IN(
     * @param goodId
     * @return
     */
    @Query("SELECT gs FROM Good g left join g.goodStatus as gs where g.id = :goodId order by gs.updateDate desc ")
    public Set<GoodStatus> fingByGoodId(@Param("goodId")Long goodId);
   

原文地址:https://www.cnblogs.com/ly-radiata/p/4807413.html