-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OneToMany update #1971
Comments
Sorry, found a solution, it's in the easy_admin.yaml configuration with the
|
Sorry but I have the same problem and same with
Does'nt work. Any idea ? |
This helped me. Thanks. @CaptainJojo What is the name of your field? Is it really |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, first of all, a big thanks for this awesome bundle !
However, something seems not to work properly.
I have read #1663, #1447 and #1446 but my problem is slightly different, and none of the solutions worked for me.
I started a Symfony4 project, added Doctrine and EasyAdmin (1.17.7).
I have a very (very) basic configuration.
I have a manyToOne association Product -> Category and a oneToMany Category -> Product.
They both are very simple, generated by Make and/or copy/paste from the official documentation here : https://symfony.com/doc/current/doctrine/associations.html
Here is my Category.php
And my Product.php
On my easy_admin.yaml config file, i just have
(Almost) everything works fine, except when i try to edit a category.
Let's say i create a category Cat1, and two products Product1 and Product2, both having Cat1 as the category.
If i edit Cat1, and i try to remove Product2, it doesn't work.
If i try to also change the name of the category at the same time, the name get's updated, but not the associated products.
I do have the
addProduct
andremoveProduct
functions, i do NOT want to addorphanRemoval=true
because in this case, it is working but delete completely the product, which is not what i want.I would like to simply set the product's category to null (and yes, the field is nullable).
Can someone help me or point out what i am doing wrong ? Thank you again ! 👍
The text was updated successfully, but these errors were encountered: