blob: 8ef2546733074108c26b98fc65e097cc74f586d0 (
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
|
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:this="http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Person">
<xsd:sequence>
<xsd:element name="address" type="xsd:IDREF" ecore:reference="this:Address" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">@ManyToOne(fetch=EAGER cascade={MERGE,PERSIST,REFRESH} targetEntity="Address" optional=true)</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="head" type="xsd:IDREF" ecore:reference="this:Head" minOccurs="0" ecore:opposite="person">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">@OneToOne(fetch=EAGER cascade=ALL targetEntity="Head" optional=true)</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Address">
<xsd:sequence>
<xsd:element name="city" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Head">
<xsd:sequence>
<xsd:element name="hairColor" type="xsd:string"/>
<xsd:element name="person" type="xsd:IDREF" ecore:reference="this:Person" ecore:opposite="head">
<xsd:annotation>
<xsd:appinfo source="http://annotation.elver.org/OneToOne" ecore:key="fetch">EAGER</xsd:appinfo>
<xsd:appinfo source="http://annotation.elver.org/OneToOne" ecore:key="cascade">MERGE PERSIST REFRESH</xsd:appinfo>
<xsd:appinfo source="http://annotation.elver.org/OneToOne" ecore:key="targetEntity">Person</xsd:appinfo>
<xsd:appinfo source="http://annotation.elver.org/OneToOne" ecore:key="optional">false</xsd:appinfo>
<xsd:appinfo source="http://annotation.elver.org/OneToOne" ecore:key="mappedBy">head</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
|