You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "ant elder (JIRA)" <tu...@ws.apache.org> on 2007/09/17 23:12:43 UTC

[jira] Updated: (TUSCANY-1725) XSD2JavaGenerator has a problem with associations navigable from both sides

     [ https://issues.apache.org/jira/browse/TUSCANY-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder updated TUSCANY-1725:
-------------------------------

    Fix Version/s: Java-SDO-Next

> XSD2JavaGenerator has a problem with associations navigable from both sides
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1725
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1725
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>         Environment: Linux
>            Reporter: Miro kandic
>             Fix For: Java-SDO-Next
>
>
> XSD2JavaGenerator does not work in the case of any association type (association, composition) that is navigable from both sides.
> I have intentionally, just to test generator, made Customer-SoH association in the next schema navigable from both sides and generated code cannot be compiled.
> Frank, after initial analyses, confirmed that saying "Bidirectional references are broken in Tuscany. They seem
> to have been broken when we switched over to the new (noEMF) codegen
> patterns."
> Next is complete XSD built automatically from the UML model.
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
>     Attention: Generated code! Do not modify by hand!
>     Generated by: XmlSchema.vsl in andromda-xmlschema-cartridge.
>   -->
> <xsd:schema
>     targetNamespace="http://www.cisco.com/odns/soa"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml"
>     xmlns:impl="http://www.cisco.com/odns/soa"
>     elementFormDefault="qualified">
>     <xsd:import namespace="commonj.sdo/xml" schemaLocation="sdoXML.xsd"/>
>     <xsd:complexType name="Address">
>         <xsd:sequence>
>             <xsd:element name="street" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="city" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>         </xsd:sequence>
>         <xsd:attribute name="xmlId" type="xsd:ID"/>
>     </xsd:complexType>
>     <xsd:complexType name="Customer">
>         <xsd:sequence>
>             <xsd:element name="orders" type="xsd:IDREF" sdoxml:propertyType="impl:SoH"
>                 sdoxml:oppositeProperty="customer" minOccurs="0" maxOccurs="unbounded" />
>             <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="created" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="lastUpdated" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="modifiedBy" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="id" type="xsd:long" minOccurs="1" maxOccurs="1"/>
>         </xsd:sequence>
>         <xsd:attribute name="xmlId" type="xsd:ID"/>
>     </xsd:complexType>
>     <xsd:complexType name="Part">
>         <xsd:sequence>
>             <xsd:element name="uom" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="aggState" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="id" type="xsd:long" minOccurs="1" maxOccurs="1"/>
>         </xsd:sequence>
>         <xsd:attribute name="xmlId" type="xsd:ID"/>
>     </xsd:complexType>
>     <xsd:complexType name="Product">
>      <xsd:complexContent>
>       <xsd:extension base="impl:Part">
>         <xsd:sequence>
>             <xsd:element name="description" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="modifiedBy" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="lastUpdated" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="created" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>         </xsd:sequence>
>       </xsd:extension>
>      </xsd:complexContent>
>     </xsd:complexType>
>     <xsd:complexType name="SoH">
>         <xsd:sequence>
>             <xsd:element name="customer" type="xsd:IDREF" sdoxml:propertyType="impl:Customer"
>                 sdoxml:oppositeProperty="orders" minOccurs="1" maxOccurs="1" />
>             <xsd:element name="lines" type="impl:SoL" minOccurs="0" maxOccurs="unbounded" />
>             <xsd:element name="number" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="receivedDate" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="modifiedBy" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="lastUpdated" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="created" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="id" type="xsd:long" minOccurs="1" maxOccurs="1"/>
>         </xsd:sequence>
>         <xsd:attribute name="xmlId" type="xsd:ID"/>
>     </xsd:complexType>
>     <xsd:complexType name="SoL">
>         <xsd:sequence>
>             <xsd:element name="product" type="xsd:IDREF" sdoxml:propertyType="impl:Product"
>                 sdoxml:oppositeProperty="soLs" minOccurs="1" maxOccurs="1" />
>             <xsd:element name="soLineSch" type="impl:SoLSch" minOccurs="0" maxOccurs="unbounded" />
>             <xsd:element name="quantity" type="xsd:double" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="requestedDate" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="modifiedBy" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="lastUpdated" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="created" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="id" type="xsd:long" minOccurs="1" maxOccurs="1"/>
>         </xsd:sequence>
>         <xsd:attribute name="xmlId" type="xsd:ID"/>
>     </xsd:complexType>
>     <xsd:complexType name="SoLSch">
>         <xsd:sequence>
>             <xsd:element name="requestedDate" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="quantity" type="xsd:double" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="modifiedBy" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="lastUpdated" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="created" type="xsd:date" minOccurs="1" maxOccurs="1"/>
>             <xsd:element name="id" type="xsd:long" minOccurs="1" maxOccurs="1"/>
>         </xsd:sequence>
>         <xsd:attribute name="xmlId" type="xsd:ID"/>
>     </xsd:complexType>
>     <xsd:element name="DataGraphRootEl" type="impl:DataGraphRoot"/>
>     <xsd:complexType name="DataGraphRoot">
>         <xsd:sequence>
>             <xsd:element name="customer" type="impl:Customer" minOccurs="0" maxOccurs="unbounded" />
>             <xsd:element name="product" type="impl:Product" minOccurs="0" maxOccurs="unbounded" />
>             <xsd:element name="part" type="impl:Part" minOccurs="0" maxOccurs="unbounded" />
>             <xsd:element name="soH" type="impl:SoH" minOccurs="0" maxOccurs="unbounded" />
>         </xsd:sequence>
>     </xsd:complexType>
> </xsd:schema>

-- 
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