Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
9 subscribers
Views
2591 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi , does anyone have a real example of CDT with the association one-to-man
marcop519
over 12 years ago
Hi ,
does anyone have a real example of CDT with the association one-to-many?
I don't know how to set correctly the generic string schema (eg. xmlns="urn:appian:example:assocations:one-to-many" ).
Thanks...
OriginalPostID-34827
OriginalPostID-34827
Discussion posts and replies are publicly visible
0
Sanjay
over 12 years ago
Appian Documentation Wiki has good example schema defining One-to-many relationship.
forum.appian.com/.../Defining_a_Custom_Data_Type
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
marcop519
over 12 years ago
I can't access..There's some form or registration to do to access at this documentation?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sanjay
over 12 years ago
Pasted below relevant parts for your reference. xmlns and targetNamespace could be customized (say to your particular cloud instance)
<xs:schema xmlns="
yourcompany.appiancloud.com/.../"
elementFormDefault="qualified" targetNamespace="
yourcompany.appiancloud.com/.../"
xmlns:xs="
www.w3.org/.../XMLSchema">
XSD:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns="urn:appian:example:assocations:one-to-many" elementFormDefault="qualified" targetNamespace="urn:appian:example:assocations:one-to-many" xmlns:xs="
www.w3.org/.../XMLSchema">
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sanjay
over 12 years ago
<xs:complexType name="Company">
<xs:sequence>
<xs:element name="id" type="xs:int">
<xs:annotation>
<xs:appinfo source="appian.jpa">
@Id
@GeneratedValue
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="name" type="xs:string" />
<xs:element maxOccurs="unbounded" name="locations" type="OfficeLocation" />
</xs:sequence>
</xs:complexType>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sanjay
over 12 years ago
<xs:complexType name="OfficeLocation">
<xs:sequence>
<xs:element name="id" type="xs:int">
<xs:annotation>
<xs:appinfo source="appian.jpa">
@Id
@GeneratedValue
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="address1" type="xs:string" />
<xs:element name="address2" nillable="true" type="xs:string" />
<xs:element name="city" type="xs:string" />
<xs:element name="state" type="xs:string" />
<xs:element name="zip" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:schema>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sanjay
over 12 years ago
Generated DDL:
create table `company` (
`id` integer not null auto_increment,
`name` varchar(255) not null,
primary key (`id`)
) type=InnoDB;
create table `officelocation` (
`id` integer not null auto_increment,
`address1` varchar(255) not null,
`address2` varchar(255),
`city` varchar(255) not null,
`state` varchar(255) not null,
`zip` integer,
`company_locations_id` integer,
`company_locations_idx` integer,
primary key (`id`)
) type=InnoDB;
alter table `officelocation`
add index company_locations (`company_locations_id`),
add constraint company_locations
foreign key (`company_locations_id`)
references `company` (`id`);
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
marcop519
over 12 years ago
Thank you !
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel