When a user adds a bio, the bios id is set equal to the user id. But I am still using AUTO INCREMENT for the bios id in my bios table. Should I turn off AUTO INCREMENT?
You should read about Table associations
I hear voices so I can’t read.
I watched a couple of videos but I still don’t know if I should disable AUTO INCREMENT.
Right now I have
$this->hasMany('Bios', [ 'foreignKey' => 'user_id', ]);
in the UsersTable and I think I should change it to hasOne but I’m not sure.
If you’re manually setting the ID field, you should disable auto increment. Also, you should not be manually setting the ID field, you should be creating associations between records in the traditional way.
Thanks, Zuluru. I will try watching a Udemy video about CakePHP.
There’s only one course on Udemy that teaches CakePHP version 4. The rest are for earlier versions of Cake. I can’t understand the instructor in this tutorial because he has a very strong Indian accent.
Maybe I should watch a video that explains an older version of Cake? I don’t know for sure.
Definitely don’t waste your time on anything for Cake 1 or 2, they are so much different from 3 that it’ll only make things worse for you.
One of the videos showed that underscores were used for the template names. I don’t know which version uses underscores. I want to watch this video because the presenter spoke good English but I don’t know if it’s version 3 or not.
The Udemy courses were on sale yesterday but the sale is over now and I can’t afford a course any more.
I think all versions use underscores for template names? I wouldn’t trust any video that doesn’t clearly specify what version it’s talking about.
maybe this is helpful for you:
This guy has a playlist with 50 videos for cake4
Thanks, dirk. I will take a look at his videos. Udemy had a sale and I bought the tutorial from the Indian guy because it’s the only one that uses CakePHP version 4. He’s hard to understand but I will somehow manage.