You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hm hard to tell, I would expect it to work. I would recommend you to try debuging the PropertyHydrator, it's using Symfony PropertyAccess under the hood
nevermind the problem is that you have society: '<numberBeetween(1, 3)x @society, so you get an array of Society. The Symfony PropertyAccess will not iterate over your collection to do X calls of addSociety() but expects to find a setSocieties() instead.
I can only suggest you the following:
Add a method setSocieties()
Register a custom hydrator (you just need to decorate the existing property hydrator and do what you want in some cases and using the decorated one in the other)
I thought of adding support for it at some point, but it comes with with a performance cost for something that requires domain knowledge and can be easily fixed. If you feel strongly about it, you may still try a PR and show a blackfire profile, if the diff is not big, I'll gladly accept it.
Hi all,
i use
nelmio/alice:^3.0@beta
to run with Symfony 3.2. But i have a pb with setter on OneToMany relation.It is a bug ? Or it's me , i do something bad ?
The text was updated successfully, but these errors were encountered: