Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我获取所需产品并在 symfony2 中设置其值的查询
$item->setProduct($id) ->setQuantity(1) ->setTemp($s1);
使用外键时,您应该使用
(getReference('YourBundle:EntityName',$id)