[ 
http://issues.apache.org/jira/browse/TUSCANY-153?page=comments#action_12432954 
] 
            
Robbie Minshall commented on TUSCANY-153:
-----------------------------------------

COMPANY WITH CHANGE SUMMARY PROPERTY

Rather than using a new type to wrap an existing type with a changeSummary I 
have simply added a changeSummary property into the sequence of an existing 
Type.  Perhaps I did this incorrectly 

I have put the xsd and the xml below and then some questions below that.  

* * * XSD * * * 

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema 
        xmlns:company="changeSummary_company.xsd" 
        xmlns:sdo="commonj.sdo" 
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        targetNamespace="changeSummary_company.xsd"> 
         
    <xsd:import namespace="commonj.sdo" schemaLocation="sdoModel.xsd"/>
    
    <xsd:element name="company" type="company:CompanyTypeCS"/>
    
    <xsd:complexType name="CompanyTypeCS">
            <xsd:sequence>
                    <xsd:element maxOccurs="unbounded" name="departments" 
type="company:DepartmentType"/>
                        <xsd:element name="changes" 
type="sdo:ChangeSummaryType"/>
            </xsd:sequence>
                            
            <xsd:attribute name="name" type="xsd:string"/>
            <xsd:attribute name="employeeOfTheMonth" type="xsd:string"/>        
  
                    
    </xsd:complexType>
    <xsd:complexType name="DepartmentType">
            <xsd:sequence>
                <xsd:element maxOccurs="unbounded" name="employees" 
type="company:EmployeeType"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string"/>         
                <xsd:attribute name="location" type="xsd:string"/>
        <xsd:attribute name="number" type="xsd:int"/>           
    </xsd:complexType>
    <xsd:complexType name="EmployeeType">
            <xsd:attribute name="name" type="xsd:string"/>
            <xsd:attribute name="SN" type="xsd:ID"/>
            <xsd:attribute name="manager" type="xsd:boolean"/>
    </xsd:complexType>       
 </xsd:schema>


* * * XML * * * 
<?xml version="1.0" encoding="ASCII"?>
<company:company 
        xmlns:company="changeSummary_company.xsd" 
        employeeOfTheMonth="E0001"
    name="ACME">

  <departments location="NY" name="Advanced Technologies" number="123">
    <employees name="John Jones" SN="E0001"/>
    <employees name="Jane Doe" SN="E0003"/>
    <employees manager="true" name="F Varone" SN="E0004"/>
  </departments>

    <changes logging="true">
    </changes>

</company:company>

* * * Questions and issues * * * 

1.  Type for changes property should be ChangeSummaryType but was Object.  I 
obtained the name of the  type using 
DataObject.getProperty("changes").getType().getName()

junit.framework.ComparisonFailure: Asserting that the type for the changes 
property is ChangeSummaryType  expected:<ChangeSummaryType> but was:<Object>

2. Obtaining ChangeSummary.
DataObject.get("changes") returns a null String
DataObject.getChangeSummary returns null where it should return a ChangeSummary 
        
3. Obtaining Sequence
I am unable to get the sequence ( which is making me think the xml may be 
incorrect ).  .getSequence() is returning null. 


> ChangeSummary on root data object not supported
> -----------------------------------------------
>
>                 Key: TUSCANY-153
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-153
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Kevin Williams
>             Fix For: Java-Mx
>
>         Attachments: do_cs_2.patch, tuscany153.jar
>
>
> The RDB DAS intends to produce data graphs without using a DataGraph instance 
> and this requires us to attach a change history to the root DataObject.  It 
> seems that this capability is not yet implemented.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to