GET, PATCH operarations works correct, but when i trey to create new entity i have erorr:
"ReflectionProperty::setValue() expects parameter 1 to be object, null given"
Tpg\ExtjsBundle\Component\JsonDeserializationVisitor.php line 45
class JsonDeserializationVisitor extends Base {
public function visitProperty(PropertyMetadata $metadata, $data, Context $context) {
...
$metadata->reflection->setValue($this->getCurrentObject(), $v); // it's line 45
...
after debugging, i found, that calling "$this->objectConstructor->construct" in JMS/Serializer/GraphNavigator::accept
Sorry for my english. Okey, what i have. First i want to say, that entity's creation with AUTO generate strategy works perfect
Entity
Controller
GET, PATCH operarations works correct, but when i trey to create new entity i have erorr:
after debugging, i found, that calling "$this->objectConstructor->construct" in JMS/Serializer/GraphNavigator::accept
returns null.
How i fix it
before call deserialize, i create new entity and persist it in Manager
it's very quick fix, but it's works for me. Can you tell me, maybe i have mistake somewhere?