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
now my question is, would it not be usefull to be able to configure the serializer via the config, to either,
try either try to create the non-existing resource, as cdonadeo did, or ignore it, like i did.
instead of the current behaviour, wich causes an exception when trying to deserialize an entity with an id in it, that is not present in the database
Please let me know if there is anything i can do to make this clearer
Thx
EDIT:
after re-reading this, i realize, that my questions regarding beeing able to config this trough the config, belong in the repo for the bundle, but at the same time im assuming it would require changes in both repos for this to be done ? correct?
The text was updated successfully, but these errors were encountered:
ok....I found another solution...
You can define your own DoctrineObjectConstructor creating a service with your class and implementing ObjectConstructorInterface, then you can customize the behaviour.
Hi,
please look at this:
cdonadeo@e10c174
this person needs an implementation, where non-existing ids, become new entities
I need a different implementation, wich would ignore non-existing id's, and set the relation to null,
i did this by changing the following:
now my question is, would it not be usefull to be able to configure the serializer via the config, to either,
try either try to create the non-existing resource, as cdonadeo did, or ignore it, like i did.
instead of the current behaviour, wich causes an exception when trying to deserialize an entity with an id in it, that is not present in the database
Please let me know if there is anything i can do to make this clearer
Thx
EDIT:
after re-reading this, i realize, that my questions regarding beeing able to config this trough the config, belong in the repo for the bundle, but at the same time im assuming it would require changes in both repos for this to be done ? correct?
The text was updated successfully, but these errors were encountered: