blob: f9e712532ddbb65f9f128163b2157f92e0ed5f20 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:this="http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride">
<xsd:complexType name="Address">
<xsd:sequence>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="postalCode" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Person">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">@MappedSuperclass</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:long">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">@Id</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="address" type="this:Address">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">@ManyToOne</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Student">
<!-- Leave the Address foreign key column as-is. ("address_id") -->
<xsd:complexContent>
<xsd:extension base="this:Person">
<xsd:sequence>
<xsd:element name="faculty" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Employee">
<xsd:annotation>
<!-- Override the Address foreign key column. ("employee_address_id") -->
<xsd:appinfo source="teneo.jpa">@AssociationOverride(name="address" joinColumns=@JoinColumn(name="employee_address_id"))</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="this:Person">
<xsd:sequence>
<xsd:element name="department" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
|