You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Pete Robbins (JIRA)" <tu...@ws.apache.org> on 2007/04/26 11:52:15 UTC
[jira] Resolved: (TUSCANY-1226) Nulls go missing in CopyHelper
[ https://issues.apache.org/jira/browse/TUSCANY-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pete Robbins resolved TUSCANY-1226.
-----------------------------------
Resolution: Fixed
string/bytes properties set to NULL (0 length) were not being set. The fix sets null values int he copied DO
> Nulls go missing in CopyHelper
> ------------------------------
>
> Key: TUSCANY-1226
> URL: https://issues.apache.org/jira/browse/TUSCANY-1226
> Project: Tuscany
> Issue Type: Bug
> Components: C++ SDO
> Affects Versions: Cpp-current
> Environment: PHP, WIn32
> Reporter: Caroline Maynard
> Priority: Minor
> Fix For: Cpp-current
>
>
> This is perhaps a variation on Tuscany-1225. Problem is that when using CopyHelper to clone a DataObject, properties which are set to null remain unset in the destination DataObject.
> Example:
> SCHEMA:
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="PersonNamespace"
> xmlns:AuthorNS="PersonNamespace">
> <complexType name="personType">
> <sequence>
> <element name="name" type="string"/>
> <element name="dob" type="string"/>
> <element name="pob" type="string"/>
> </sequence>
> </complexType>
> </schema>
> logic:
> $xmldas = SDO_DAS_XML::create('person.xsd');
> $person = $xmldas->createDataObject('PersonNamespace','personType');
> $person->name = "William Shakespeare'";
> $person->dob = null;
> $person->pob = null;
> $person2 = clone($person);
> After the clone the php $person looks like:
> object(SDO_DataObject)#3 (3) {name=>"William Shakespeare'"; dob=>NULL; pob=>NULL}
> but $person2 is:
> object(SDO_DataObject)#4 (3) {name=>"William Shakespeare'"; dob; pob}
> (I can't show you the Tuscany print of the DO, because it causes an AccessViolation :-) )
> Problem is perhaps that transferitem() doesn't consider nulls
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org