<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                **1. 實體類建立關系** ```java public class Country { //country 對應 Province.country 屬性名 @OneToMany(mappedBy = "country", fetch = FetchType.EAGER) private List<Province> provinceList; } ``` ```java public class Province { //Country -> Province 是一對多,反過來 Province -> Country 就是多對一 @ManyToOne(targetEntity = Country.class) //country_id 對應 Country.id 屬性名 //將會在 Province 表中建立 country_id 的物理外鍵 @JoinColumn(name = "country_id", referencedColumnName = "id") private Country country; } ``` **2. @Query多表查詢** ```java /** * HSQL查詢 */ @Query("select country from Country country left join Province province " + "on country.id=province.country.id where country.continent=?1 and province.level=?2") List<Country> findAll01(String continent, Integer level); /** * SQL查詢 */ @Query(value = "select c.* from country c left join province p " + "on c.id=p.country_id where c.continent=?1 and p.level=?2", nativeQuery = true) List<Country> findAll02(String continent, Integer level); ``` ```java /** * HSQL查詢 */ @Query("select province from Province province left join Country country " + "on province.country.id=country.id where province.level=?1 and country.name=?2") List<Province> findAll01(Integer level, String name); /** * SQL查詢 */ @Query(value = "select p.* from province p left join country c " + "on p.country_id=c.id where p.level=?1 and c.name=?2", nativeQuery = true) List<Province> findAll02(Integer level, String name); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看