I need to define a value (previously created entites Id) for a column reference in a doctrine 2 model, for example
class product { protected $category; public function assignCategoryId($id) { $this->category_id=$id; } }
I assume that category_id is created by Doctrine 2 as the name of the link column. Do not ask why I want to assign the id to the object itself, because it should be so. Is there any way to do this? Any idea?
Orhan source share