<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、一對一 * User模型中: Profile \*Profile`orm:"rel(one)"`正向關系,有外鍵字段 * Profile模型中: User \*User`orm:"reverse(one)"`反向關系,只是關系,沒有外鍵 ~~~ type User struct { Id int Name string Img *Userimg `orm:"reverse(one)"` //一對一 } type Userimg struct { Id int Name string User *User `orm:"rel(one)"` //一對一 } func init() { orm.RegisterModel(new(User), new(Userimg)) } ~~~ 2、一對多 * article模型中:User \*User`orm:"rel(fk)"`正向關系,有外鍵,外鍵在多的一方 * user模型中:Articles \[\]\*Articles `orm:"reverse(many)" 反向關系,沒有外鍵 一對多,外鍵在多的一方 ~~~ type User struct { Id int Name string Ather []*Ather `orm:"reverse(many)"` //一對多 } type Ather struct { Id int Name string User *User `orm:"rel(fk)"` //一對多 } func init() {orm.RegisterModel(new(User), new(Ather)) } ~~~ 3、多對多 * post模型中:Tags \[\]\*Tag`orm:"rel(m2m)"`正向關系,沒有外鍵 * tag模型中:Posts \[\]\*Post`orm:"reverse(many)"`反向關系,沒有外鍵 ![](https://img.kancloud.cn/00/ec/00ec1854511a42470509179752197a8d_869x476.png)
                  <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>

                              哎呀哎呀视频在线观看