validation - Symfony2: adding dynamically an element to a double embedded relation form -


one model this:

class x {     /**      * @orm\onetomany(targetentity="block", mappedby="x",cascade={"all"}, orphanremoval=true)      */     private $block; ...  class block {     /**      * @orm\onetoone(targetentity="blocka", mappedby="block")      */     private $blocka;      /**      * @orm\onetoone(targetentity="blockb", mappedby="block")      */     private $blockb; ... class blocka { ... 

i can dynamically add blocks x (collection) through ajax in xtype form. saving correctly.

but cannot save dynamically created blocka nested in block. gives me form validation error: "this form should not contain fields.".

the form validator admits "x" dynamically adding "block"s new relations "blocka" or "blockb". in collection of "block"s of them having relations objectos of class "blocka" or of them having relations elements of class "blockb". imposible validate collection of "block"s having "blocka" relation , others having "blockb" relation (validation error fields shown).

any ideas?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -