My Octobercms pivot table gets the data that model table should get when i try to add to it
<p>I have an annoying problem, using latest OctoberCMS build (318), where it tries to save the wrong data to the pivot table instead of model table.</p>

<p>I have a model Businesses, and a model Openinghours:</p>

<p>Model for <em>Businesses</em>:</p>

<pre><code>`public $table = 'ekstremedia_emcityportal_businesses';`
`public $belongsToMany = [
    'openinghours' =&gt; [
            'Ekstremedia\EmCityportal\Models\Openinghours',
            'table' =&gt; 'ekstremedia_emcityportal_ohb',
            'order' =&gt; 'week_day',
            'week_day' =&gt; 'week_day',
            'name' =&gt; 'week_day',
    ]           
];`    
</code></pre>

<p><code>ekstremedia_emcityportal_ohb</code> is the pivot table with <code>business_id</code> and <code>openinghours_id</code></p>

<p>And model for <em>Openinghours</em>:</p>

<pre><code>public $table = 'ekstremedia_emcityportal_openinghours';
public $belongsToMany = [
        'businesses' =&gt; ['Ekstremedia\EmCityportal\Models\Business',
        'table' =&gt; 'ekstremedia_emcityportal_businesses',
        'order' =&gt; 'created_at desc'       
  ]
];   
</code></pre>

<p>In the Business controllers <code>field.yaml</code> i have done this, to add opening hours to a business:</p>

<pre><code>    openinghours:
        type: repeater
        label: 'Åpningstider'
        tab: 'Åpningstider'
        form:
            fields:
                week_day:
                    label: Dag
                    oc.commentPosition: ''
                    options:
                        1: Måndag
                        2: Tysdag
                        3: Onsdag
                        4: Torsdag
                        5: Fredag
                        6: Laurdag
                        7: Sundag
                    span: left
                    type: dropdown
                open_hour:
                    label: Date added
                    type: datepicker
                    mode: time
                close_hour:
                    mode: time
                    label: Date added
                    type: datepicker
</code></pre>

<p>The problem is, october is trying to save the opening hours to the pivot table and not the model table. Anyone have an idea how i can fix that? Ive tried alot of different options. .</p>

<p>This is the error i get on the backend: </p>

<pre><code> SQLSTATE[42S22]: Column not found: 1054 Unknown column 'close_hour' in 'field list' (SQL: insert into 'ekstremedia_emcityportal_ohb' ('business_id', 'close_hour', 'open_hour', 'openinghours_id', 'week_day')...
</code></pre>

<p><code>close_hour</code>, <code>open_hour</code>, <code>openinghours_id</code>, <code>week_day</code> etc, is in <code>ekstremedia_emcityportal_openinghours</code> , defined in <code>Openinghours</code> model, not in <code>ekstremedia_emcityportal_ohb</code> wich is the pivot table...</p>