title: Gorm call Where() with foreignkey
body: <p>I have a gorm model:</p>
  <pre><code>type Order struct {
      ID             int    `json:&quot;id&quot; gorm:&quot;column:id&quot;`
      ProductID      int    `json:&quot;product_id&quot; gorm:&quot;column:product_id&quot;`
      Price int    `json:&quot;per_credit_price&quot; gorm:&quot;column:per_credit_price&quot;`
  
      Product Product `gorm:&quot;foreignkey:ProductID;AssociationForeignKey:ID&quot;`
  }
  </code></pre>
  <p>And i`d like to write a query, like:</p>
  <pre><code>p.DB.Preload(&quot;Product&quot;).Where(ord).First(ord).Error
  </code></pre>
  <p>if my <code>ord</code> struct contains the Product as struct, it returns with the following error:</p>
  <blockquote>
  <p>sql: converting argument $8 type: unsupported type models.Product, a
  struct</p>
  </blockquote>
  <p>It would work find Find() instead of Where(), but I'd like to query for others than ID.</p>
  <p>How could I make it work?</p>