<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sakata_harumi</author_name>
  <author_url>https://blog.hatena.ne.jp/sakata_harumi/</author_url>
  <blog_title>JKになりたい</blog_title>
  <blog_url>https://wanttobejk.com/</blog_url>
  <categories>
    <anon>Tech</anon>
  </categories>
  <description>昨日から色々あってGo langで開発をはじめました。 超にわかですが、気づいたことやハマったことなどあれば備忘録を残しておこうと思います。 今回は、gormを使ってBelongToの関係にあるFishモデルとWaterAreeモデルのリレーションを組んでみます。 github.com また、Fishは1匹ではなく、複数匹Selectする必要があります。 (1)Relationメソッドを使う方法 type Fish struct { ID uint `json:&quot;id&quot; gorm:&quot;column:id&quot;` Name string `json:&quot;name&quot; gorm:&quot;column:name&quot;`…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwanttobejk.com%2Fentry%2F2018%2F06%2F14%2F143710&quot; title=&quot;gormでRelationを組む方法とn+1の回避 - JKになりたい&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-06-14 14:37:10</published>
  <title>gormでRelationを組む方法とn+1の回避</title>
  <type>rich</type>
  <url>https://wanttobejk.com/entry/2018/06/14/143710</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
