Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Annotation in ecore model (foreign key and annotation for options)
[Teneo] Annotation in ecore model (foreign key and annotation for options) [message #616106] Tue, 08 April 2008 17:49
Torsten Link is currently offline Torsten LinkFriend
Messages: 51
Registered: July 2009
Member
Hi,


--------------------------------------------------------
1. FOREIGN_KEY Annotation:
--------------------------------------------------------

I Have the following Model.

A Class Library contains many Books. Containment Reference.
The foreignKey in the book table is library_id.

Now I would like to set an Annotation in the ecore which defines that
the Relation is a bag not a list and the foreignKey Column name is
'library_id'.

I tried the following Annotation (I tried also many more ...) but it
does not work.
    <eStructuralFeatures
xsi:type="ecore:EReference"
name="books"
upperBound="-1"
eType="#//IBook"
        containment="true">

      <eAnnotations source="teneo.jpa">
        <details
key="appinfo"
value="@OneToMany(mappedBy=library_id)"/>

      </eAnnotations>
    </eStructuralFeatures>

 

--------------------------------------------------------
2. Could I set the following Options also as Annotation?
--------------------------------------------------------

PersistenceOptions.ALWAYS_MAP_LIST_AS_BAG
PersistenceOptions.SQL_NAME_ESCAPE_CHARACTER
PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH
PersistenceOptions.ALWAYS_VERSION

or how could I define it for each relation
 

Thank you in advance

Torsten Link
Previous Topic:EMF Compare Diff Tree customization
Next Topic:[Teneo] Problem with StringToStringMap and @Lob @Column Annotation
Goto Forum:
  


Current Time: Fri Jun 25 11:27:45 GMT 2021

Powered by FUDForum. Page generated in 0.02019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top