Re: [Cakephp 3.2.5] Cannot match provided foreignKey

2016-03-28 Thread 'Manuel Maurer' via CakePHP
Argh, what a stupid mistake Not sure why I forgot to add primary indices, but adding them did the trick. Not a very helpful error message though. Thanks for the help! -- Sign up for our Newsletter for updates. http://cakephp.org/newsletter/signup We will soon be closing this Google

Re: [Cakephp 3.2.5] Cannot match provided foreignKey

2016-03-25 Thread heavyKevy
> > In addition to the other reply, i recommend that you use the bake utility > to bake your models so that all of the needed files are created along with > the correct syntax. > from a dos command prompt, cd to your application folder that contains your bin and src folders and issue the

Re: [Cakephp 3.2.5] Cannot match provided foreignKey

2016-03-25 Thread Gaurav Kumar
Hello Manuel, In your tables there is no PRIMARY KEY defined. So, your tables should look like this CREATE TABLE `articles` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `user_id` bigint(20) unsigned NOT NULL, PRIMARY KEY