title: Return data using relation in adonisjs is null
body: <p>I want to fetching data from two table that have one to one relation in database using adonisjs. When i'm try to fetch all data from one of table, that result is null.</p>
  
  <p>This is my relation code in model:</p>
  
  <pre><code>class Cart extends Model {
  
      product () {
          return this.hasOne('App/Models/Product')
      }
      static get table()
      {
          return 'cart'
      }
  
      static get primaryKey()
      {
          return 'id_cart'
      }
  
      static get foreignKey()
      {
          return 'id_product'
      }
  
  ...
  </code></pre>
  
  <p>This is my product's model:</p>
  
  <pre><code>class Product extends Model {
  
      static get table()
      {
          return 'product'
      }
  
      static get primaryKey()
      {
          return 'product_id'
      }
  
  }
  module.exports = Product
  </code></pre>
  
  <p>Then, this is my controller</p>
  
  <pre><code>async index ({response}) {
          const allProduct = await Cart.query().with('product').fetch();
          return response.json({
              status:true,
              data: allProduct
          })
      }
  </code></pre>
  
  <p><strong>edited</strong></p>
  
  <p>This is my cart schema</p>
  
  <pre><code>class CartSchema extends Schema {
  
    async up () {
      const exists = await this.hasTable('cart')
  
      if (!exists) {
        this.create('cart', (table) =&gt; {
          table.increments()
          table.string('id_product').unsigned().references('product_id').inTable('product')
          table.timestamps()
        })
      }
  ...
  </code></pre>
  
  <p>And this is my product schema:</p>
  
  <pre><code>class ProductSchema extends Schema {
      async up () {
      const exists = await this.hasTable('product')
  
      if (!exists) {
          this.create('product', (table) =&gt; {
            table.increments()
            table.timestamps()
          })
       }
  ...
  </code></pre>
  
  <p>data product above is null. Whats wrong with this code ?</p>