简体   繁体   中英

Symfony 3 / sonata_type_collection change query each add row

I'm using the Sonata Admin and currently trying to get me to be able to change my query to every click event in the sonata_type_collection.

I have the 'Variation' entity in which it contains the collection type in the form to call the entity 'Value'.

However, this 'Value' entity contains an auto relationship to reference parent values ​and child values ​ex: (Id 1 does not contain any parent, so its field will be null, but id 2 contains a parent value, putting id 1 in the parent field parent).

The idea was that with each click that was given to add a new row of values, check the previous row and perform a new query to bring only the "child values".

看一下SonataMediaBundle和SonataClassificationBundle源代码,似乎有一个类似的情况,就像您描述的那样。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM