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
XmlDeserializationVisitor::visitProperty uses reflection to set properties unless none of xmlAttribute, xmlValue, xmlCollection are set. For any remaining properties, reflection will only be used if metadata->setter is null. The latter logic seems more desirable for all cases.
This is presumably a bug? I can't see any reason the following configuration should not be using setItems when deserializing from XML:
class Order {
/**
* @Type("ArrayCollection<Item>")
* @XmlList(entry = "item", inline = true)
* @AccessType("public_method")
*/
private $items;
public function setItems($items){
$this->items = $items;
//Do something else
}
}
I ran into this when attempting to make sure my Items were aware of my Orders, as Item was the owner of a Doctrine association.
The text was updated successfully, but these errors were encountered:
XmlDeserializationVisitor::visitProperty uses reflection to set properties unless none of xmlAttribute, xmlValue, xmlCollection are set. For any remaining properties, reflection will only be used if metadata->setter is null. The latter logic seems more desirable for all cases.
This is presumably a bug? I can't see any reason the following configuration should not be using setItems when deserializing from XML:
I ran into this when attempting to make sure my Items were aware of my Orders, as Item was the owner of a Doctrine association.
The text was updated successfully, but these errors were encountered: