I have a simple question on associations in cakephp.
I have a user , role and tutor table.
The issue is how do i define this where I have a admin user who can view tutors but there is no tutor entry with this user? Or do I need to bother as not all users are tutors anyway.
I can create a user that is a tutor and have the userID in the tutor table as a foreign key.
The role is the user type like admin, tutor etc which is linked to the user.
public $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id'
public $hasOne = array(
'Tutor' => array(
'className' => 'Tutor',
'dependent' => true