I would like to create a model using join. This is the code i have:
$userModel = new self;
$select = $userModel->select();
$select->setIntegrityCheck(false)
->from(array('u' => 'accounts'),array('username','email'))
->where('u.id = ?',$id)
->join(array('i' => 'permissions'),'i.user_id = u.id',array('permission_type'));
$user = $userModel->fetchRow($select);
This works perfectly. The only problem is that the permission_type in permissions table has multiple entries. Using this code, I only get the first entry in the model! Is there a way to get around that, and get all the entries?