[DDC-2300] Xmldriver does not convert the version field to boolean but keeps it as a SimpleXMLElement which breaks serialization Created: 16/Feb/13  Updated: 14/Mar/13  Resolved: 14/Mar/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Mapping Drivers
Affects Version/s: 2.3.2
Fix Version/s: 2.3.3
Security Level: All

Type: Bug Priority: Major
Reporter: Jaco Stienstra Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


Serialization breaks because the cache driver tries to serialize the ClassMetaData instance containing a simplexml element:

Doctrine\ORM\Mapping\ClassMetadata Object
    [fieldMappings] => Array
            [version] => Array
                    [fieldName] => version
                    [type] => integer
                    [columnName] => version
                    [version] => SimpleXMLElement Object
                            [0] => true

                    [default] => 1
                    [declared] => path to entity

The fix is simple change in the columnToArray method in the XML driver class:


$mapping['version'] = $fieldMapping['version'];


$mapping['version'] = $this->evaluateBoolean($fieldMapping['version']);

Generated at Tue Oct 06 14:35:14 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.