[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.emf] Re: [Teneo] Ignoring annotation defining @Column name =
|
- From: Martin Taal <mtaal@xxxxxxxxx>
- Date: Tue, 14 Oct 2008 12:10:58 +0200
- Newsgroups: eclipse.tools.emf
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.17 (X11/20080925)
Hi David,
Does @JoinColumn work here? Also it is possible the name needs to be enclosed with "
gr. Martin
David Wynter wrote:
Hi,
I want a self referential 0..1 relationship. So have the element defined
like this
<xsd:complexType name="InstrumentDomain">
<xsd:sequence>
<xsd:element ecore:opposite="instrumentDomain" minOccurs="0"
maxOccurs="1" name="underlyingInstrument" type="gensec:InstrumentDomain" >
<xsd:annotation>
<xsd:appinfo
source="teneo.jpa">@Column(name=underlyinginstrument)</xsd:appinfo>
</xsd:annotation>
</xsd:element>
.....
</xsd:sequence>
<xsd:attribute name="id" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">
@Id @GeneratedValue(strategy=IDENTITY)
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
.....
</xsd:complexType>
<xsd:element name="instrumentDomain" type="gensec:InstrumentDomain" />
What I get is a column name INSTRUMENTDOMAIN as the foreign key, not
underlyinginstrument as I expected. Anything else I need to do to force
the name I need?
Thx.
David
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxxxxxxxx - mtaal@xxxxxxxxx
Web: www.springsite.com - www.elver.org