cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

Not working $this->hasManyThrough() function in \Phalcon\Mvc\Model

Open alexvlasov opened this issue 13 years ago • 2 comments

Example from docs


class Robots extends \Phalcon\Mvc\Model
{

   public function initialize()
   {
       //A reference relation must be set
       $this->hasMany('id', 'RobotsParts', 'robots_id');

       //Setup a many-to-many relation to Parts through RobotsParts
       $this->hasManyThrough('Parts', 'RobotsParts');

   }

}

model.c listing


PHP_METHOD(Phalcon_Mvc_Model, hasManyThrough){

.....

PHALCON_CALL_METHOD_PARAMS_3_NORETURN(manager, "addhasmanythrough", this_ptr, reference_model, options); 
//                                                     ^^^^ calling "addhasmanythrough"
    
    PHALCON_MM_RESTORE();
}

manager.c listing


PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyThrough){
   
 Method empty... =(

}

alexvlasov avatar Jan 20 '13 21:01 alexvlasov

Sorry, that method is still not implemented, I'm closing this since original NFR is in #225

ghost avatar Jan 21 '13 09:01 ghost

In Isuee #225 you mentioned this to be part of 0.9, now 1.0 is out and I could not find any mention of this functionality in the docs - is it implemented or will that be part of a later version? :)

philippgerard avatar Mar 16 '13 15:03 philippgerard