Zend Framework : Database find throws "Too few columns for the primary key" exception
I am trying to use the `find` function to query the database table by id. The table has 4 primary keys (3 foreign keys).  
This is the code of the table data gateway:  

    class Application_Model_DbTable_Assigneduser extends Zend_Db_Table_Abstract
    {  
        protected $_name = 'assigneduser';  
    }  
  
This is the code of the Mapper:  

    public function find($id)
    {
    	$result = $this->getDbTable()->find($id);
    	if(count($result) == 0)
    		return;
    	$row=$result->current();
    	$assignedUser = new Application_Model_AssignedUser();
    	$assignedUser->setId($row->id)
    		->setIdProject($row->id_project)
    		->setIdUser($row->id_user)
    	        ->setIdTask($row->id_task);
    }  
The code I use to instantiate the mapper and where I use the method `find`:  

    public function indexAction()
    {
        	echo "<xmp>";
            $user=new Application_Model_AssignedUserMapper();
            print_r($user->find(3));
            echo '</xmp>';
    }  
  
I used the `print_r` and `xmp` tag to have a good look at what the code returns.  The exception message I get is:  

    Message: Too few columns for the primary key  
  
I have no idea what to do to fix it. Any idea? Thank you!
Zend Framework : Database find throws "Too few columns for the primary key" exception
===

I am trying to use the `find` function to query the database table by id. The table has 4 primary keys (3 foreign keys).  
This is the code of the table data gateway:  

    class Application_Model_DbTable_Assigneduser extends Zend_Db_Table_Abstract
    {  
        protected $_name = 'assigneduser';  
    }  
  
This is the code of the Mapper:  

    public function find($id)
    {
    	$result = $this->getDbTable()->find($id);
    	if(count($result) == 0)
    		return;
    	$row=$result->current();
    	$assignedUser = new Application_Model_AssignedUser();
    	$assignedUser->setId($row->id)
    		->setIdProject($row->id_project)
    		->setIdUser($row->id_user)
    	        ->setIdTask($row->id_task);
    }  
The code I use to instantiate the mapper and where I use the method `find`:  

    public function indexAction()
    {
        	echo "<xmp>";
            $user=new Application_Model_AssignedUserMapper();
            print_r($user->find(3));
            echo '</xmp>';
    }  
  
I used the `print_r` and `xmp` tag to have a good look at what the code returns.  The exception message I get is:  

    Message: Too few columns for the primary key  
  
I have no idea what to do to fix it. Any idea? Thank you!