Anonymous
public php v1 · immutable<?php$ret = new Product_Extras();$ret->Product->item_code = $product_id; // We need this relation to fill Product_Extras.product_id with the Product.id number$ret->description = $this->getRequestParameter('description');// Somehow magically $ret->product_id should be filled based on the $ret->Product->id relation$ret->save();