You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Caroline Maynard (JIRA)" <tu...@ws.apache.org> on 2007/04/24 13:18:15 UTC

[jira] Created: (TUSCANY-1226) Nulls go missing in CopyHelper

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


[jira] Resolved: (TUSCANY-1226) Nulls go missing in CopyHelper

Posted by "Pete Robbins (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Robbins resolved TUSCANY-1226.
-----------------------------------

    Resolution: Fixed

Caroline's patch is applied.

> 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
>
>         Attachments: Tuscany-1226.patch
>
>
> 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


[jira] Reopened: (TUSCANY-1226) Nulls go missing in CopyHelper

Posted by "Caroline Maynard (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Caroline Maynard reopened TUSCANY-1226:
---------------------------------------


> 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
>
>         Attachments: Tuscany-1226.patch
>
>
> 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


[jira] Closed: (TUSCANY-1226) Nulls go missing in CopyHelper

Posted by "Caroline Maynard (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Caroline Maynard closed TUSCANY-1226.
-------------------------------------


> 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
>
>         Attachments: Tuscany-1226.patch
>
>
> 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


[jira] Resolved: (TUSCANY-1226) Nulls go missing in CopyHelper

Posted by "Pete Robbins (JIRA)" <tu...@ws.apache.org>.
     [ 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


[jira] Updated: (TUSCANY-1226) Nulls go missing in CopyHelper

Posted by "Caroline Maynard (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Caroline Maynard updated TUSCANY-1226:
--------------------------------------

    Attachment: Tuscany-1226.patch

Got rid of the crash but didn't quite do it for me. Two reasons:
a) NULLs are not the same as empty strings. 
b) Still getting SDONullPointerExceptions out of resolveReferences()

The attached makes my tests run OK. How is it for you?

> 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
>
>         Attachments: Tuscany-1226.patch
>
>
> 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