blob: 674daedb0785af0959bbbc79023a9ac3050ae054 (
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
|
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="attroverridesecondarytable"
nsURI="http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable"
nsPrefix="attroverridesecondarytable">
<eClassifiers xsi:type="ecore:EClass" name="Address">
<eAnnotations source="teneo.jpa">
<details key="value" value="@Embeddable"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="street" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="city" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="country" eType="#//Country"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
<eAnnotations source="teneo.jpa">
<details key="value" value="@Inheritance(strategy=SINGLE_TABLE)
"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Employee" eSuperTypes="#//Person">
<eAnnotations source="teneo.jpa">
<details key="value" value="@SecondaryTable(name="secondary_table")"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="address" eType="#//Address">
<eAnnotations source="teneo.jpa">
<details key="value" value="@Embedded
@AttributeOverrides({
	@AttributeOverride(name="name" column=@Column(name="other_name" table="secondary_table")),
	@AttributeOverride(name="street" column=@Column(name="other_street" table="secondary_table")),
	@AttributeOverride(name="city" column=@Column(name="other_city" table="secondary_table"))
})
@AssociationOverrides({
	@AssociationOverride(name="country" joinColumns=@JoinColumn(name="addr_country" table="secondary_table"))
})"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="employeeNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="teneo.jpa">
<details key="value" value="@Column(name="emp_num" table="secondary_table")"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NonEmployee" eSuperTypes="#//Person">
<eStructuralFeatures xsi:type="ecore:EReference" name="address" eType="#//Address">
<eAnnotations source="teneo.jpa">
<details key="value" value="@Embedded"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Country">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>
|