Hi All, Here is my situation for writing xsd's had 3 c

Hi All,

Here is my situation for writing xsd's

had 3 cdt's

1. client - xsd created - table created
2. employee - xsd created - table created

3. pay

in this pay cdt PK of client and PK of employee are the foreign keys and they are mapped with "many to one" relationship with those 2 (means many records in pay can have single client or employee )

I already have referred forum.appian.com/.../Defining_a_Custom_Data_Type

and written xsd for pay with following annotations.

<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns="urn:appian:example:assocations:many-to-one" elementFormDefault="qualified" targetNamespace="urn:appian:example:assocations:many-to-one" xmlns:xsd="www.w3.org/.../XMLSchema">

<xsd:complexType name="pay">
--
<xsd:element minOccurs="0" nillable="false" maxOccurs="unbounded" name="clientId" type="client">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@ManyToOne
                     ...

OriginalPostID-77431

OriginalPostID-77431

  Discussion posts and replies are publicly visible

Parents
  • Sarat, Try the following structure:
    <?xml version="1.0" encoding="utf-8" ?>
    <xsd:schema xmlns="www.appian.com/.../" elementFormDefault="qualified" targetNamespace="www.appian.com/.../" xmlns:xsd="www.w3.org/.../XMLSchema">
    <xsd:complexType name="pay">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @Table(name="pay")
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element nillable="false" name="clientId" type="client">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @ManyToOne
    @JoinColumn(name="clientidinteger", nullable=false, unique=true)
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
              <xsd:element nillable="false" name="employeeID" type="emp">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @ManyToOne
              @JoinColumn(name="employeeidinteger", nullable=false, unique=true)
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
                         </xsd:complexType>          
    <xsd:complexType name="emp">
    -----
    </xsd:complexType>
               <xsd:complexType name="client">
    --------
    </xsd:complexType>                    
    </xsd:schema>
Reply
  • Sarat, Try the following structure:
    <?xml version="1.0" encoding="utf-8" ?>
    <xsd:schema xmlns="www.appian.com/.../" elementFormDefault="qualified" targetNamespace="www.appian.com/.../" xmlns:xsd="www.w3.org/.../XMLSchema">
    <xsd:complexType name="pay">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @Table(name="pay")
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element nillable="false" name="clientId" type="client">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @ManyToOne
    @JoinColumn(name="clientidinteger", nullable=false, unique=true)
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
              <xsd:element nillable="false" name="employeeID" type="emp">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @ManyToOne
              @JoinColumn(name="employeeidinteger", nullable=false, unique=true)
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
                         </xsd:complexType>          
    <xsd:complexType name="emp">
    -----
    </xsd:complexType>
               <xsd:complexType name="client">
    --------
    </xsd:complexType>                    
    </xsd:schema>
Children
No Data