Cakephp 3 multiple associations same model
<p>I'm building a game. For now I have 3 tables, 'games', 'users' and 'games_users'. For 'games' and 'users' I baked all files The association for 'games_users' works fine.</p>

<p>This are my tables:</p>

<pre><code>CREATE TABLE `games` (
`id` int(11) NOT NULL,
`owner` int(11) NOT NULL,
`userturn` int(11) NOT NULL,
`tag` varchar(20) NOT NULL,
`status` int(1) NOT NULL,
`gametype_id` int(11) NOT NULL,
`won` int(11) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `users` (
`id` int(11) NOT NULL,
`facebook` varchar(20) NOT NULL,
`first_name` varchar(20) NOT NULL,
`last_name` varchar(20) NOT NULL,
`username` varchar(20) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(50) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `games_users` (
`game_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
</code></pre>

<p>My associations for games_users:</p>

<p>In GamesTable:</p>

<pre><code>$this-&gt;belongsToMany('Users', [
        'foreignKey' =&gt; 'game_id',
        'targetForeignKey' =&gt; 'user_id',
        'joinTable' =&gt; 'games_users'
]);
</code></pre>

<p>In UsersTable:</p>

<pre><code>$this-&gt;belongsToMany('Games', [
        'foreignKey' =&gt; 'user_id',
        'targetForeignKey' =&gt; 'game_id',
        'joinTable' =&gt; 'games_users'
]);
</code></pre>

<p>In the table 'games' there are two columns 'userturn' and 'won', they are both users_id's. How do i make the associations for those columns?</p>