symfony - Symfony2 embedded form and left join entities -


I find two organizations that work properly using a theory, which is left, the problem occurs When I try to edit using a form and the details are empty (no row was found). How do I ensure that description.producted product.productid?

  Object (Test \ AdminBundle \ unit / product) is populated with # 245 (5) [["Manufacturer": Protected] = & gt; String (4) "8989" ["Product": Protected] = & gt; String (12) "Test Test" ["Value": Protected] = & gt; String (4) "9, 9 5" ["Gruped": Protected] = & gt; String (2) "72" ["Description": Protected] = & gt; Object (Test \ AdminBundle \ unit \ description) # 417 (3) {["Manufacturer": Protected] = & gt; NULL ["Description": protected] = & gt; String (4) "qweq fdasd"}} class product {/ ** * @Assert \ notBlank (groups = {"edit"}) * @Assert \ Range (min = "100", max = "99999", groups = {"Search", "edit"}) * @ORM \ Id * @ORM \ columns (type = "integer") * / protected $ productid; ... / ** * @ Aspert's type (type = "test \ adminbundle \ unit \ description") * @ORM \ OneToOne (target = "description", cascade = {"release"}) * @ORM \ JoinColumn (name = "Produced", referenced column name = "productive") * / protected $ description; ...} Category Description {/ ** * @ORM \ Id * @ORM \ column (type = "integer") * / protected $ productid; / ** * @ORM \ column (type = "text") * / protected $ description; ...}   

Mysql myisam are using the same productive as all primary keys:

  product productid | Price | More Columns | ... Details productid | Details | More Columns | ...    

You can simply add $ description-> setProduct ( $ This) addDescription (description $ description) method product in the unit. Therefore, whenever you add a new detail object to a product, those fields are automatically populated.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -