For the first part, in you Product
entity, you have addProductCombinations
method. Make it like so:
public function addProductCombinations($object)
{
$this->productCombinations[] = $object;
$object->setProduct($this); // This line is important.
}
This should get you moving. Alternatively, you can set product inside prePersist
/ preUpdate
actions in your admin.
The second part of the question is a bit unclear. Do you want to have attributes that are of different types like text / choice / multiple choice? If so, you will have to dynamically modify the form using How to Dynamically Modify Forms Using Form Events. But hey, maybe you can reuse some existing bundles, like packagist: assortment.