Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Two problems @GenericGenerate strategy="foreign" and @ManyToMany
Two problems @GenericGenerate strategy="foreign" and @ManyToMany [message #118628] Wed, 16 April 2008 00:15 Go to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090903010004070201020205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Martin,

I'm trying to build the ultimate example collection for my co-workers to
use. I've got nearly everything working, but I'm stuck on two items.
Would you load this .xsd file and explain why I get:

" org.eclipse.emf.teneo.annotations.mapper.StoreMappingExcepti on: The
feature/eclass parent/M2mbjoin should be a ManyToOne but it already has
a OneToMany, ManyToMany or OneToOne annotation" on the object "m2mbjoin"

And a "can't find property" error on "o2oschild".

Thanks for any help!

Jason Henriksen

P.S. If you notice anything else I'm not doing in the best way, I'd love
your feedback on this file.

(I'm pasting it in for the sake of searching later, but also attaching
it so you can DL it more easily)

--------------------------------------



<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:com.ibm.example.connection="http:///com/ibm/example/connection.ecore"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
ecore:nsPrefix="com.ibm.example.connection"
ecore:package="com.ibm.example.connection"
targetNamespace="http:///com/ibm/example/connection.ecore"
xmlns="http:///com/ibm/example/connection.ecore"
>

<!--

EMF is all about making a model and storing it in an XML Resource. That
resource could be a local file or a remore XML page.
Teneo lets EMF treat the database as a resource. It handles the mapping
from EMF object into Hibernate maps and from there
Hibernate can save the data.

This XSD shows the complete set of possible object associations as
renderd in the CONTAINMENT view.
This view is supported by ILOG, but does not allow the same item to be
referenced in more than one place without creating a copy of that item.
Most of the time this limitation does not matter, however since EMF
supports xsd:IDREF but ILOG does not, you have to be slightly careful.
All but one of the associations in this document are ILOG compatible.
To use the IDREF/anyURI view look for the example discussing references.

Note:
- When the teneo documentation adds columns we don't see in the
underlying legacy tables, we have to add properties to turn those
features OFF. (all extra columns can be killed thu properties)
- Teneo documentation about object associations can be found here:
http://elver.org/hibernate/hibernaterelations.html



Table of Name Abbreviations:
o2o => One to One
o2m => One to Many
m2o => Many to One
m2m => Many to Many

s => Single Directional (always parent to child for these examples)
b => Bi-Directional

parent => parent table holds foreign key
child => child table holds foreign key
join => join table
childInvis => child table holds foreign key, but has no attribute to
read it
childEmbed => child table is embedded in parent table

Example Object Names:
o2osparent
o2oschild
o2osjoin
o2oschildInvis
o2oschildEmbed

o2obparent
o2obchild
o2objoin
o2obchildInvis pointless (it's not bidirectional try o2osjoin)
o2obchildEmbed impossible (embedded type doesn't know what it is
embedded into)

o2msparent impossible (need multiple o2oschildEmbed, or API Helper)
o2mschild
o2msjoin
o2mschildInvis
o2mschildEmbed

o2mbparent impossible (need multiple o2oschildEmbed, or API Helper)
o2mbchild
o2mbjoin
o2mbchildInvis impossible (bidirectional implies child can see parent)
o2mbchildEmbed impossible (need multiple o2oschildEmbed, or API Helper)

m2osparent
m2oschild impossible (child would become parent and use o2m)
m2osjoin
m2oschildInvis impossible (see m2oschild)
m2oschildEmbed pointless (use o2oschildEmbed; embedded single is not
longer asingle item)

m2ob* pointless (use o2mb*)

m2ms* pointless (m2m implies bidirectional)

m2mbparent impossible (need multiple o2mschildEmbed on both sides, or
API Helper)
m2mbchild impossible (need multiple o2mschildEmbed on both sides, or
API Helper)
m2mbjoin
m2mbchildInvis impossible (need multiple o2mschildEmbed on both sides,
or API Helper)
m2mbchildEmbed impossible (need multiple o2mschildEmbed on both
sides, or API Helper)

-->

<!-- used by one of the child objects, but needs to be declared up here -->
<xsd:annotation><xsd:appinfo source="teneo.jpa">
@GenericGenerator(name="foreign", strategy = "foreign", parameters={
@Parameter(name="property", value="idChild")
})
</xsd:appinfo></xsd:annotation>

<!-- ==== Child Type Definitions Start Here ==== -->

<!-- Paren't handles the mapping, no child annotations needed -->
<xsd:complexType name="o2osparent">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2osparent")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- My primary key matches the parent's primary key. I don't have
an attribute for my parent, but with this object the parent could be
found -->
<!-- note that the id is NOT generated here. Getting this to work
without an exception is a big trick -->
<!-- We have to tell hibernate to read the value of the parent and use
that as its primary key. Otherwise -->
<!-- we'll get all kind of violation erros. -->
<xsd:complexType name="o2oschild">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2oschild")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">
@Id
@GeneratedValue(generator="foreign")
@Column(name="IDCHILD")
</xsd:appinfo></xsd:annotation></xsd:element>
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- The parent has handled everything needed for this association.
The child cannot see the parent. -->
<xsd:complexType name="o2osjoin">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2osjoin")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- The parent will add an unmapped column to my table. Given only
the child object, this parent object could not be found without dropping
to SQL. I also have no Java dependencies on the parent class. -->
<xsd:complexType name="o2oschildInvis">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2oschildInvis")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- This object is not allowed to have a primary key! Also it must
be marked as embedable, and have no table specified. Different data
column for clarity -->
<xsd:complexType name="O2oschildEmbed">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Embeddable</xsd:appinfo></xsd:annotation >
<xsd:sequence>
<xsd:element type="xsd:string"
name="phone"><xsd:annotation><xsd:appinfo
source="teneo.jpa">@Column(name="phone" unique="true"
length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- This child can find its parent. The parent holds the foreign
key column -->
<xsd:complexType name="o2obparent">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2obparent")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="Parent" name="parent">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToOne(mappedBy="o2obparent")</xsd:appinfo ></xsd:annotation></xsd:element>
</xsd:sequence>
</xsd:complexType>

<!-- This child can find its parent. The child holds the foreign key
column -->
<xsd:complexType name="o2obchild">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2obchild")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="Parent" name="parent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
@JoinColumn(name="PARENT")</xsd:appinfo></xsd:annotation ></xsd:element>
</xsd:sequence>
</xsd:complexType>

<!-- The parent covered defining the join. I just add the annotation
so I can find my way to the parent and mention which parent field I
belong to -->
<xsd:complexType name="o2objoin">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2objoin")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="Parent" name="parent">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToOne(mappedBy="o2objoin")</xsd:appinfo ></xsd:annotation></xsd:element>
</xsd:sequence>
</xsd:complexType>

<!-- I can't use the primary key for the association because child
holds the FK. But I'm also supposed to be uni-directional from the
parent. Solution: Make the parent accessor private -->
<xsd:complexType name="o2mschild">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2mschild")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="Parent" name="parent"
ecore:suppressSetVisibility='true' ecore:suppressGetVisibility='true'>
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToOne(mappedBy="o2objoin")</xsd:appinfo ></xsd:annotation></xsd:element>
</xsd:sequence>
</xsd:complexType>

<!-- In the join table case, the parent has already done all the
mapping needed. This makes the parent Invisible, but without the
'secret column' needed in the next example -->
<xsd:complexType name="o2msjoin">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2msjoin")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- In the Invisible case we want to have no mention of the parent
at all. The only way is to ignore the parent mapping and let Teneo add
it without the class knowing about it. -->
<xsd:complexType name="o2mschildInvis">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2mschildInvis")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- This child class will be embedded just like the other. No table
name allowed, and no id column allowed. For illustration it is also
given different data columns -->
<xsd:complexType name="o2mschildEmbed">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Embeddable</xsd:appinfo></xsd:annotation >
<xsd:sequence>
<xsd:element type="xsd:string" name="city">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="CITY"
length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string"
name="state"><xsd:annotation><xsd:appinfo
source="teneo.jpa">@Column(name="STATE"
length="2")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- This is the most straight forward one to many case -->
<xsd:complexType name="o2mbchild">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2mbchild")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="Parent" name="parent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
@JoinColumn(name="parent")</xsd:appinfo></xsd:annotation ></xsd:element>
</xsd:sequence>
</xsd:complexType>

<!-- the parent has taken care of all the annotations needed -->
<xsd:complexType name="o2mbjoin">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="o2mbjoin")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="Parent" name="parent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
@JoinTable(name="o2mbjoinjointable", joinColumns = {
@JoinColumn(name="idChild", unique = true) }, inverseJoinColumns = {
@JoinColumn(name="id") } )</xsd:appinfo></xsd:annotation></xsd:element>
</xsd:sequence>
</xsd:complexType>

<!-- This object has no awareness of the parent. This could be a
reusable code or often referenced and easily shared data object -->
<xsd:complexType name="m2osparent">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="m2osparent")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- Again, this object has no awareness of the parent. This could
be a reusable code or often referenced and easily shared data object -->
<xsd:complexType name="m2osjoin">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="m2osjoin")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="idChild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
</xsd:sequence>
</xsd:complexType>

<!-- This type cannot be supported by JRules and requires special
handling by EMF. Notice that the type is IDREF. Refer to the earlier
example XSD to see how to manage these -->
<!-- If you need URLs instead of in-document references look ahead to
the anyURI examples
-->
<xsd:complexType name="m2mbjoin">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Table(name="m2mbjoin")</xsd:appinfo ></xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="id">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
@GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:string" name="data">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
<xsd:element type="xsd:IDREF" ecore:reference="Parent"
name="parent" ecore:opposite="m2mbjoin">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@ManyToMany(mappedBy="m2mbjoin" targetEntity="Parent"
indexed=false)
@JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>
</xsd:sequence>
</xsd:complexType>

<!-- ====== Parent definition starts here ====== -->

<!--
WARNING: I define the parent AFTER the children to be sure that the
parents are saved before the children!
If there is no other information available, Teneo saves the objects in
the order that they are defined.
-->

<xsd:complexType name="Parent">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">
@Table(name=PARENT)
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element type="xsd:int" name="id">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">
@Id
@GeneratedValue(strategy=AUTO)
@Column(name="ID" unique="true")
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element type="xsd:string" name="data">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">
@Column(name="DATA" unique="true" length="25")
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<!-- Badly formatted for easier comparison. Expand what you're
interested in -->
<xsd:element maxOccurs="1" name="o2osparent" type="o2osparent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
@JoinColumn(name="o2osp")</xsd:appinfo></xsd:annotation> </xsd:element>

<!-- the child does all the work to hold this relationship. I can
use @PrimaryKeyJoinColumn because the key of the child is the join I
care about -->
<xsd:element maxOccurs="1" name="o2oschild" type="o2oschild">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
@PrimaryKeyJoinColumn</xsd:appinfo></xsd:annotation></xsd:element >

<xsd:element maxOccurs="1" name="o2osjoin" type="o2osjoin"
minOccurs="0">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@JoinTable(name="o2osjoin_jointable", joinColumns = {
@JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
@JoinColumn(name="idChild") }
)</xsd:appinfo></xsd:annotation></xsd:element>

<xsd:element maxOccurs="1" name="o2oschildInvis" type="o2oschildInvis">
<!-- Nothing to annotate on the child => No ability to control child
column name; -->
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToOne</xsd:appinfo></xsd:annotation ></xsd:element>

<xsd:element maxOccurs="1" name="o2oschildEmbed" type="O2oschildEmbed">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@Embedded</xsd:appinfo></xsd:annotation ></xsd:element>

<xsd:element maxOccurs="1" name="o2obparent" type="o2obparent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
@JoinColumn(name="o2obp")</xsd:appinfo></xsd:annotation> </xsd:element>

<xsd:element maxOccurs="1" name="o2obchild" type="o2obchild">
<!-- note: the option mappedBy="parent" means that this is controlled
by the 'parent' attribute of the CHILD object) -->
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToOne(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>

<xsd:element maxOccurs="1" name="o2objoin" type="o2objoin">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
@JoinTable(name="o2objoin_jointable", joinColumns = {
@JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
@JoinColumn(name="idChild") } )</xsd:appinfo></xsd:annotation></xsd:element>

<xsd:element maxOccurs="unbounded" name="o2mschild" type="o2mschild">
<!-- note: the option mappedBy="parent" means that this is controlled
by the 'parent' attribute of the CHILD object) -->
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>

<xsd:element maxOccurs="unbounded" name="o2msjoin" type="o2msjoin">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToMany
@JoinTable(name="o2msjoinjointable", joinColumns = {
@JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
@JoinColumn(name="idChild") } )</xsd:appinfo></xsd:annotation></xsd:element>

<xsd:element maxOccurs="unbounded" name="o2mschildInvis"
type="o2mschildInvis">
<!-- Nothing to annotate on the child => No ability to control child
column name -->
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToMany</xsd:appinfo></xsd:annotation ></xsd:element>

<xsd:element maxOccurs="1" name="o2mschildEmbed1" type="o2mschildEmbed">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
@AttributeOverrides({ @AttributeOverride(name="city",
column=@Column(name="city1")), @AttributeOverride(name="state",
column=@Column(name="state1"))})</xsd:appinfo></xsd:annotation ></xsd:element>

<xsd:element maxOccurs="1" name="o2mschildEmbed2" type="o2mschildEmbed">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
@AttributeOverrides({ @AttributeOverride(name="city",
column=@Column(name="city2")), @AttributeOverride(name="state",
column=@Column(name="state2"))})</xsd:appinfo></xsd:annotation ></xsd:element>

<xsd:element maxOccurs="1" name="o2mschildEmbed3" type="o2mschildEmbed">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
@AttributeOverrides({ @AttributeOverride(name="city",
column=@Column(name="city3")), @AttributeOverride(name="state",
column=@Column(name="state3"))})</xsd:appinfo></xsd:annotation ></xsd:element>

<xsd:element maxOccurs="unbounded" name="o2mbchild" type="o2mbchild">
<!-- note: the option mappedBy="parent" means that this is controlled
by the 'parent' attribute of the CHILD object) -->
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>

<xsd:element maxOccurs="unbounded" name="o2mbjoin" type="o2mbjoin">
<!-- note: the option mappedBy="parent" means that this is controlled
by the 'parent' attribute of the CHILD object) -->
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>

<xsd:element maxOccurs="1" name="m2osparent" type="m2osparent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
@JoinColumn(name="m2osp")</xsd:appinfo></xsd:annotation> </xsd:element>

<xsd:element maxOccurs="1" name="m2osjoin" type="m2osjoin">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
@JoinTable(name="m2osjoinjointable", joinColumns = {
@JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
@JoinColumn(name="idChild") }
)</xsd:appinfo></xsd:annotation></xsd:element>

<!-- WARNING: This association cannot be supported by JRules due to
lack of support for IDREF types -->
<xsd:element maxOccurs="unbounded" name="m2mbjoin" type="xsd:IDREF"
ecore:reference="m2mbjoin" ecore:opposite="parent">
<xsd:annotation><xsd:appinfo
source="teneo.jpa">@ManyToMany(indexed=false, targetEntity="m2mbjoin")
@JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>
</xsd:sequence>
</xsd:complexType>


</xsd:schema>

--------------090903010004070201020205
Content-Type: text/xml;
name="connections.xsd"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="connections.xsd"

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHhzZDpz Y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hUeXBlIG5hbWU9Im0ybWJqb2luIj4KCTx4c2Q6YW5ub3RhdGlvbj48eHNk OmFwcGluZm8g
c291cmNlPSJ0ZW5lby5qcGEiPkBUYWJsZShuYW1lPSJtMm1iam9pbiIpPC94 c2Q6YXBwaW5m
bz48L3hzZDphbm5vdGF0aW9uPgogICAgPHhzZDpzZXF1ZW5jZT4KCSAgICA8 eHNkOmVsZW1l
bnQgdHlwZT0ieHNkOmludCIgbmFtZT0iaWQiPgkJPHhzZDphbm5vdGF0aW9u Pjx4c2Q6YXBw
aW5mbyBzb3VyY2U9InRlbmVvLmpwYSI+QElkIEBHZW5lcmF0ZWRWYWx1ZShz dHJhdGVneT1B
VVRPKSBAQ29sdW1uKG5hbWU9IklEQ0hJTEQiIHVuaXF1ZT0idHJ1ZSIpPC94 c2Q6YXBwaW5m
bz48L3hzZDphbm5vdGF0aW9uPjwveHNkOmVsZW1lbnQ+CgkgICAgPHhzZDpl bGVtZW50IHR5
cGU9InhzZDpzdHJpbmciIG5hbWU9ImRhdGEiPgk8eHNkOmFubm90YXRpb24+ PHhzZDphcHBp
bmZvIHNvdXJjZT0idGVuZW8uanBhIj5AQ29sdW1uKG5hbWU9IkRBVEEiIHVu aXF1ZT0idHJ1
ZSIgbGVuZ3RoPSIyNSIpPC94c2Q6YXBwaW5mbz48L3hzZDphbm5vdGF0aW9u PjwveHNkOmVs
ZW1lbnQ+CgkgICAgPHhzZDplbGVtZW50IHR5cGU9InhzZDpJRFJFRiIgZWNv cmU6cmVmZXJl
bmNlPSJQYXJlbnQiIG5hbWU9InBhcmVudCIgZWNv
Re: Two problems @GenericGenerate strategy="foreign" and @ManyToMany [message #118645 is a reply to message #118628] Wed, 16 April 2008 07:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
I checked it out and I needed to change two things to have the datastore initialize correctly. I did
not get the can't find property error. But I got the first one you mention and one other (see point
2 below).

1) The first exception you get is related to the bi-directional relation m2mbjoin.parent <-->
Parent.m2mbjoin. You set a manytomany annotation however in the xsd the m2mbjoin.parent element has
maxOccurs not set so it defaults to 1. So therefor currently in the xsd the relation is a
many-to-one instead of a many-to-many, I added maxOccurs="unbounded" and then the many-to-many
parses correctly.

2) the entity-name of the m2mbjoin type is M2mbjoin. Teneo uses as a default the eclass name and the
eclass name has the first character upper-cased. So I needed to change the name in the targetEntity
attribute below (is the last element in the xsd):
<xsd:element maxOccurs="unbounded" name="m2mbjoin" type="xsd:IDREF" ecore:reference="m2mbjoin"
ecore:opposite="parent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToMany(indexed=false,
targetEntity="M2mbjoin")
@JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>

With these changes the database is created.

gr. Martin

jason henriksen wrote:
> Hi Martin,
>
> I'm trying to build the ultimate example collection for my co-workers to
> use. I've got nearly everything working, but I'm stuck on two items.
> Would you load this .xsd file and explain why I get:
>
> " org.eclipse.emf.teneo.annotations.mapper.StoreMappingExcepti on: The
> feature/eclass parent/M2mbjoin should be a ManyToOne but it already has
> a OneToMany, ManyToMany or OneToOne annotation" on the object "m2mbjoin"
>
> And a "can't find property" error on "o2oschild".
>
> Thanks for any help!
>
> Jason Henriksen
>
> P.S. If you notice anything else I'm not doing in the best way, I'd love
> your feedback on this file.
>
> (I'm pasting it in for the sake of searching later, but also attaching
> it so you can DL it more easily)
>
> --------------------------------------
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema
> xmlns:com.ibm.example.connection="http:///com/ibm/example/connection.ecore"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> ecore:nsPrefix="com.ibm.example.connection"
> ecore:package="com.ibm.example.connection"
> targetNamespace="http:///com/ibm/example/connection.ecore"
> xmlns="http:///com/ibm/example/connection.ecore"
> >
>
> <!--
>
> EMF is all about making a model and storing it in an XML Resource. That
> resource could be a local file or a remore XML page.
> Teneo lets EMF treat the database as a resource. It handles the mapping
> from EMF object into Hibernate maps and from there
> Hibernate can save the data.
>
> This XSD shows the complete set of possible object associations as
> renderd in the CONTAINMENT view.
> This view is supported by ILOG, but does not allow the same item to be
> referenced in more than one place without creating a copy of that item.
> Most of the time this limitation does not matter, however since EMF
> supports xsd:IDREF but ILOG does not, you have to be slightly careful.
> All but one of the associations in this document are ILOG compatible. To
> use the IDREF/anyURI view look for the example discussing references.
>
> Note:
> - When the teneo documentation adds columns we don't see in the
> underlying legacy tables, we have to add properties to turn those
> features OFF. (all extra columns can be killed thu properties)
> - Teneo documentation about object associations can be found here:
> http://elver.org/hibernate/hibernaterelations.html
>
>
>
> Table of Name Abbreviations:
> o2o => One to One
> o2m => One to Many
> m2o => Many to One
> m2m => Many to Many
>
> s => Single Directional (always parent to child for these examples)
> b => Bi-Directional
>
> parent => parent table holds foreign key
> child => child table holds foreign key
> join => join table
> childInvis => child table holds foreign key, but has no attribute to
> read it
> childEmbed => child table is embedded in parent table
>
> Example Object Names:
> o2osparent
> o2oschild
> o2osjoin
> o2oschildInvis
> o2oschildEmbed
>
> o2obparent
> o2obchild
> o2objoin
> o2obchildInvis pointless (it's not bidirectional try o2osjoin)
> o2obchildEmbed impossible (embedded type doesn't know what it is
> embedded into)
>
> o2msparent impossible (need multiple o2oschildEmbed, or API
> Helper)
> o2mschild
> o2msjoin
> o2mschildInvis
> o2mschildEmbed
>
> o2mbparent impossible (need multiple o2oschildEmbed, or API
> Helper)
> o2mbchild
> o2mbjoin
> o2mbchildInvis impossible (bidirectional implies child can see parent)
> o2mbchildEmbed impossible (need multiple o2oschildEmbed, or API
> Helper)
>
> m2osparent
> m2oschild impossible (child would become parent and use o2m)
> m2osjoin
> m2oschildInvis impossible (see m2oschild)
> m2oschildEmbed pointless (use o2oschildEmbed; embedded single is
> not longer asingle item)
>
> m2ob* pointless (use o2mb*)
>
> m2ms* pointless (m2m implies bidirectional)
>
> m2mbparent impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
> m2mbchild impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
> m2mbjoin
> m2mbchildInvis impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
> m2mbchildEmbed impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
>
> -->
>
> <!-- used by one of the child objects, but needs to be declared up
> here -->
> <xsd:annotation><xsd:appinfo source="teneo.jpa">
> @GenericGenerator(name="foreign", strategy = "foreign",
> parameters={
> @Parameter(name="property", value="idChild")
> })
> </xsd:appinfo></xsd:annotation>
>
> <!-- ==== Child Type Definitions Start Here ==== -->
>
> <!-- Paren't handles the mapping, no child annotations needed -->
> <xsd:complexType name="o2osparent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2osparent")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- My primary key matches the parent's primary key. I don't have an
> attribute for my parent, but with this object the parent could be found -->
> <!-- note that the id is NOT generated here. Getting this to
> work without an exception is a big trick -->
> <!-- We have to tell hibernate to read the value of the parent
> and use that as its primary key. Otherwise -->
> <!-- we'll get all kind of violation
> erros.
> -->
> <xsd:complexType name="o2oschild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2oschild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">
> @Id
> @GeneratedValue(generator="foreign")
> @Column(name="IDCHILD")
> </xsd:appinfo></xsd:annotation></xsd:element>
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- The parent has handled everything needed for this association.
> The child cannot see the parent. -->
> <xsd:complexType name="o2osjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2osjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- The parent will add an unmapped column to my table. Given only
> the child object, this parent object could not be found without dropping
> to SQL. I also have no Java dependencies on the parent class. -->
> <xsd:complexType name="o2oschildInvis">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2oschildInvis")</xsd:appinfo ></xsd:annotation>
>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This object is not allowed to have a primary key! Also it must
> be marked as embedable, and have no table specified. Different data
> column for clarity -->
> <xsd:complexType name="O2oschildEmbed">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Embeddable</xsd:appinfo></xsd:annotation >
> <xsd:sequence>
> <xsd:element type="xsd:string"
> name="phone"><xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Column(name="phone" unique="true"
> length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This child can find its parent. The parent holds the foreign key
> column -->
> <xsd:complexType name="o2obparent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2obparent")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="o2obparent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This child can find its parent. The child holds the foreign key
> column -->
> <xsd:complexType name="o2obchild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2obchild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinColumn(name="PARENT")</xsd:appinfo></xsd:annotation ></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- The parent covered defining the join. I just add the annotation
> so I can find my way to the parent and mention which parent field I
> belong to -->
> <xsd:complexType name="o2objoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2objoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="o2objoin")</xsd:appinfo ></xsd:annotation></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- I can't use the primary key for the association because child
> holds the FK. But I'm also supposed to be uni-directional from the
> parent. Solution: Make the parent accessor private -->
> <xsd:complexType name="o2mschild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mschild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent"
> ecore:suppressSetVisibility='true' ecore:suppressGetVisibility='true'>
>
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="o2objoin")</xsd:appinfo ></xsd:annotation></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- In the join table case, the parent has already done all the
> mapping needed. This makes the parent Invisible, but without the
> 'secret column' needed in the next example -->
> <xsd:complexType name="o2msjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2msjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- In the Invisible case we want to have no mention of the parent at
> all. The only way is to ignore the parent mapping and let Teneo add it
> without the class knowing about it. -->
> <xsd:complexType name="o2mschildInvis">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mschildInvis")</xsd:appinfo ></xsd:annotation>
>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This child class will be embedded just like the other. No table
> name allowed, and no id column allowed. For illustration it is also
> given different data columns -->
> <xsd:complexType name="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Embeddable</xsd:appinfo></xsd:annotation >
> <xsd:sequence>
> <xsd:element type="xsd:string" name="city">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="CITY"
> length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string"
> name="state"><xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Column(name="STATE"
> length="2")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This is the most straight forward one to many case -->
> <xsd:complexType name="o2mbchild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mbchild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinColumn(name="parent")</xsd:appinfo></xsd:annotation ></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- the parent has taken care of all the annotations needed -->
> <xsd:complexType name="o2mbjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mbjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinTable(name="o2mbjoinjointable", joinColumns = {
> @JoinColumn(name="idChild", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="id") } )</xsd:appinfo></xsd:annotation></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This object has no awareness of the parent. This could be a
> reusable code or often referenced and easily shared data object -->
> <xsd:complexType name="m2osparent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="m2osparent")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- Again, this object has no awareness of the parent. This could be
> a reusable code or often referenced and easily shared data object -->
> <xsd:complexType name="m2osjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="m2osjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This type cannot be supported by JRules and requires special
> handling by EMF. Notice that the type is IDREF. Refer to the earlier
> example XSD to see how to manage these -->
> <!-- If you need URLs instead of in-document references look ahead to
> the anyURI examples -->
> <xsd:complexType name="m2mbjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="m2mbjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="id">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:IDREF" ecore:reference="Parent"
> name="parent" ecore:opposite="m2mbjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@ManyToMany(mappedBy="m2mbjoin" targetEntity="Parent"
> indexed=false)
> @JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- ====== Parent definition starts here ====== -->
>
> <!--
> WARNING: I define the parent AFTER the children to be sure that the
> parents are saved before the children!
> If there is no other information available, Teneo saves the objects
> in the order that they are defined.
> -->
>
> <xsd:complexType name="Parent">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">
> @Table(name=PARENT)
> </xsd:appinfo>
> </xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="id">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">
> @Id
> @GeneratedValue(strategy=AUTO)
> @Column(name="ID" unique="true")
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
>
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">
> @Column(name="DATA" unique="true" length="25")
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
>
> <!-- Badly formatted for easier comparison. Expand what you're
> interested in -->
> <xsd:element maxOccurs="1" name="o2osparent"
> type="o2osparent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinColumn(name="o2osp")</xsd:appinfo></xsd:annotation> </xsd:element>
>
> <!-- the child does all the work to hold this relationship.
> I can use @PrimaryKeyJoinColumn because the key of the child is the join
> I care about -->
> <xsd:element maxOccurs="1" name="o2oschild"
> type="o2oschild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @PrimaryKeyJoinColumn</xsd:appinfo></xsd:annotation></xsd:element >
>
> <xsd:element maxOccurs="1" name="o2osjoin"
> type="o2osjoin" minOccurs="0">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@JoinTable(name="o2osjoin_jointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2oschildInvis"
> type="o2oschildInvis">
> <!-- Nothing to annotate on the child => No ability to
> control child column name; -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne</xsd:appinfo></xsd:annotation ></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2oschildEmbed"
> type="O2oschildEmbed">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Embedded</xsd:appinfo></xsd:annotation ></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2obparent"
> type="o2obparent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinColumn(name="o2obp")</xsd:appinfo></xsd:annotation> </xsd:element>
>
> <xsd:element maxOccurs="1" name="o2obchild"
> type="o2obchild">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="o2objoin"
> type="o2objoin">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinTable(name="o2objoin_jointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <xsd:element maxOccurs="unbounded" name="o2mschild"
> type="o2mschild">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="unbounded" name="o2msjoin"
> type="o2msjoin">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToMany
> @JoinTable(name="o2msjoinjointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <xsd:element maxOccurs="unbounded" name="o2mschildInvis"
> type="o2mschildInvis">
> <!-- Nothing to annotate on the child => No ability to
> control child column name -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany</xsd:appinfo></xsd:annotation ></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2mschildEmbed1"
> type="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
> @AttributeOverrides({ @AttributeOverride(name="city",
> column=@Column(name="city1")), @AttributeOverride(name="state",
> column=@Column(name="state1"))})</xsd:appinfo></xsd:annotation ></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="o2mschildEmbed2"
> type="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
> @AttributeOverrides({ @AttributeOverride(name="city",
> column=@Column(name="city2")), @AttributeOverride(name="state",
> column=@Column(name="state2"))})</xsd:appinfo></xsd:annotation ></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="o2mschildEmbed3"
> type="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
> @AttributeOverrides({ @AttributeOverride(name="city",
> column=@Column(name="city3")), @AttributeOverride(name="state",
> column=@Column(name="state3"))})</xsd:appinfo></xsd:annotation ></xsd:element>
>
>
> <xsd:element maxOccurs="unbounded" name="o2mbchild"
> type="o2mbchild">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="unbounded" name="o2mbjoin"
> type="o2mbjoin">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="m2osparent"
> type="m2osparent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinColumn(name="m2osp")</xsd:appinfo></xsd:annotation> </xsd:element>
>
> <xsd:element maxOccurs="1" name="m2osjoin"
> type="m2osjoin">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinTable(name="m2osjoinjointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <!-- WARNING: This association cannot be supported by JRules
> due to lack of support for IDREF types -->
> <xsd:element maxOccurs="unbounded" name="m2mbjoin"
> type="xsd:IDREF" ecore:reference="m2mbjoin" ecore:opposite="parent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@ManyToMany(indexed=false, targetEntity="m2mbjoin")
> @JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
>
> </xsd:schema>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Two problems @GenericGenerate strategy="foreign" and @ManyToMany [message #617768 is a reply to message #118628] Wed, 16 April 2008 07:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
I checked it out and I needed to change two things to have the datastore initialize correctly. I did
not get the can't find property error. But I got the first one you mention and one other (see point
2 below).

1) The first exception you get is related to the bi-directional relation m2mbjoin.parent <-->
Parent.m2mbjoin. You set a manytomany annotation however in the xsd the m2mbjoin.parent element has
maxOccurs not set so it defaults to 1. So therefor currently in the xsd the relation is a
many-to-one instead of a many-to-many, I added maxOccurs="unbounded" and then the many-to-many
parses correctly.

2) the entity-name of the m2mbjoin type is M2mbjoin. Teneo uses as a default the eclass name and the
eclass name has the first character upper-cased. So I needed to change the name in the targetEntity
attribute below (is the last element in the xsd):
<xsd:element maxOccurs="unbounded" name="m2mbjoin" type="xsd:IDREF" ecore:reference="m2mbjoin"
ecore:opposite="parent">
<xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToMany(indexed=false,
targetEntity="M2mbjoin")
@JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>

With these changes the database is created.

gr. Martin

jason henriksen wrote:
> Hi Martin,
>
> I'm trying to build the ultimate example collection for my co-workers to
> use. I've got nearly everything working, but I'm stuck on two items.
> Would you load this .xsd file and explain why I get:
>
> " org.eclipse.emf.teneo.annotations.mapper.StoreMappingExcepti on: The
> feature/eclass parent/M2mbjoin should be a ManyToOne but it already has
> a OneToMany, ManyToMany or OneToOne annotation" on the object "m2mbjoin"
>
> And a "can't find property" error on "o2oschild".
>
> Thanks for any help!
>
> Jason Henriksen
>
> P.S. If you notice anything else I'm not doing in the best way, I'd love
> your feedback on this file.
>
> (I'm pasting it in for the sake of searching later, but also attaching
> it so you can DL it more easily)
>
> --------------------------------------
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema
> xmlns:com.ibm.example.connection="http:///com/ibm/example/connection.ecore"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> ecore:nsPrefix="com.ibm.example.connection"
> ecore:package="com.ibm.example.connection"
> targetNamespace="http:///com/ibm/example/connection.ecore"
> xmlns="http:///com/ibm/example/connection.ecore"
> >
>
> <!--
>
> EMF is all about making a model and storing it in an XML Resource. That
> resource could be a local file or a remore XML page.
> Teneo lets EMF treat the database as a resource. It handles the mapping
> from EMF object into Hibernate maps and from there
> Hibernate can save the data.
>
> This XSD shows the complete set of possible object associations as
> renderd in the CONTAINMENT view.
> This view is supported by ILOG, but does not allow the same item to be
> referenced in more than one place without creating a copy of that item.
> Most of the time this limitation does not matter, however since EMF
> supports xsd:IDREF but ILOG does not, you have to be slightly careful.
> All but one of the associations in this document are ILOG compatible. To
> use the IDREF/anyURI view look for the example discussing references.
>
> Note:
> - When the teneo documentation adds columns we don't see in the
> underlying legacy tables, we have to add properties to turn those
> features OFF. (all extra columns can be killed thu properties)
> - Teneo documentation about object associations can be found here:
> http://elver.org/hibernate/hibernaterelations.html
>
>
>
> Table of Name Abbreviations:
> o2o => One to One
> o2m => One to Many
> m2o => Many to One
> m2m => Many to Many
>
> s => Single Directional (always parent to child for these examples)
> b => Bi-Directional
>
> parent => parent table holds foreign key
> child => child table holds foreign key
> join => join table
> childInvis => child table holds foreign key, but has no attribute to
> read it
> childEmbed => child table is embedded in parent table
>
> Example Object Names:
> o2osparent
> o2oschild
> o2osjoin
> o2oschildInvis
> o2oschildEmbed
>
> o2obparent
> o2obchild
> o2objoin
> o2obchildInvis pointless (it's not bidirectional try o2osjoin)
> o2obchildEmbed impossible (embedded type doesn't know what it is
> embedded into)
>
> o2msparent impossible (need multiple o2oschildEmbed, or API
> Helper)
> o2mschild
> o2msjoin
> o2mschildInvis
> o2mschildEmbed
>
> o2mbparent impossible (need multiple o2oschildEmbed, or API
> Helper)
> o2mbchild
> o2mbjoin
> o2mbchildInvis impossible (bidirectional implies child can see parent)
> o2mbchildEmbed impossible (need multiple o2oschildEmbed, or API
> Helper)
>
> m2osparent
> m2oschild impossible (child would become parent and use o2m)
> m2osjoin
> m2oschildInvis impossible (see m2oschild)
> m2oschildEmbed pointless (use o2oschildEmbed; embedded single is
> not longer asingle item)
>
> m2ob* pointless (use o2mb*)
>
> m2ms* pointless (m2m implies bidirectional)
>
> m2mbparent impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
> m2mbchild impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
> m2mbjoin
> m2mbchildInvis impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
> m2mbchildEmbed impossible (need multiple o2mschildEmbed on both
> sides, or API Helper)
>
> -->
>
> <!-- used by one of the child objects, but needs to be declared up
> here -->
> <xsd:annotation><xsd:appinfo source="teneo.jpa">
> @GenericGenerator(name="foreign", strategy = "foreign",
> parameters={
> @Parameter(name="property", value="idChild")
> })
> </xsd:appinfo></xsd:annotation>
>
> <!-- ==== Child Type Definitions Start Here ==== -->
>
> <!-- Paren't handles the mapping, no child annotations needed -->
> <xsd:complexType name="o2osparent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2osparent")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- My primary key matches the parent's primary key. I don't have an
> attribute for my parent, but with this object the parent could be found -->
> <!-- note that the id is NOT generated here. Getting this to
> work without an exception is a big trick -->
> <!-- We have to tell hibernate to read the value of the parent
> and use that as its primary key. Otherwise -->
> <!-- we'll get all kind of violation
> erros.
> -->
> <xsd:complexType name="o2oschild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2oschild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">
> @Id
> @GeneratedValue(generator="foreign")
> @Column(name="IDCHILD")
> </xsd:appinfo></xsd:annotation></xsd:element>
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- The parent has handled everything needed for this association.
> The child cannot see the parent. -->
> <xsd:complexType name="o2osjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2osjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- The parent will add an unmapped column to my table. Given only
> the child object, this parent object could not be found without dropping
> to SQL. I also have no Java dependencies on the parent class. -->
> <xsd:complexType name="o2oschildInvis">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2oschildInvis")</xsd:appinfo ></xsd:annotation>
>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This object is not allowed to have a primary key! Also it must
> be marked as embedable, and have no table specified. Different data
> column for clarity -->
> <xsd:complexType name="O2oschildEmbed">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Embeddable</xsd:appinfo></xsd:annotation >
> <xsd:sequence>
> <xsd:element type="xsd:string"
> name="phone"><xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Column(name="phone" unique="true"
> length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This child can find its parent. The parent holds the foreign key
> column -->
> <xsd:complexType name="o2obparent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2obparent")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="o2obparent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This child can find its parent. The child holds the foreign key
> column -->
> <xsd:complexType name="o2obchild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2obchild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinColumn(name="PARENT")</xsd:appinfo></xsd:annotation ></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- The parent covered defining the join. I just add the annotation
> so I can find my way to the parent and mention which parent field I
> belong to -->
> <xsd:complexType name="o2objoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2objoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="o2objoin")</xsd:appinfo ></xsd:annotation></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- I can't use the primary key for the association because child
> holds the FK. But I'm also supposed to be uni-directional from the
> parent. Solution: Make the parent accessor private -->
> <xsd:complexType name="o2mschild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mschild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent"
> ecore:suppressSetVisibility='true' ecore:suppressGetVisibility='true'>
>
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="o2objoin")</xsd:appinfo ></xsd:annotation></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- In the join table case, the parent has already done all the
> mapping needed. This makes the parent Invisible, but without the
> 'secret column' needed in the next example -->
> <xsd:complexType name="o2msjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2msjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- In the Invisible case we want to have no mention of the parent at
> all. The only way is to ignore the parent mapping and let Teneo add it
> without the class knowing about it. -->
> <xsd:complexType name="o2mschildInvis">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mschildInvis")</xsd:appinfo ></xsd:annotation>
>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This child class will be embedded just like the other. No table
> name allowed, and no id column allowed. For illustration it is also
> given different data columns -->
> <xsd:complexType name="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Embeddable</xsd:appinfo></xsd:annotation >
> <xsd:sequence>
> <xsd:element type="xsd:string" name="city">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="CITY"
> length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string"
> name="state"><xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Column(name="STATE"
> length="2")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This is the most straight forward one to many case -->
> <xsd:complexType name="o2mbchild">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mbchild")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinColumn(name="parent")</xsd:appinfo></xsd:annotation ></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- the parent has taken care of all the annotations needed -->
> <xsd:complexType name="o2mbjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="o2mbjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="Parent" name="parent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinTable(name="o2mbjoinjointable", joinColumns = {
> @JoinColumn(name="idChild", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="id") } )</xsd:appinfo></xsd:annotation></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This object has no awareness of the parent. This could be a
> reusable code or often referenced and easily shared data object -->
> <xsd:complexType name="m2osparent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="m2osparent")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- Again, this object has no awareness of the parent. This could be
> a reusable code or often referenced and easily shared data object -->
> <xsd:complexType name="m2osjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="m2osjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="idChild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- This type cannot be supported by JRules and requires special
> handling by EMF. Notice that the type is IDREF. Refer to the earlier
> example XSD to see how to manage these -->
> <!-- If you need URLs instead of in-document references look ahead to
> the anyURI examples -->
> <xsd:complexType name="m2mbjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Table(name="m2mbjoin")</xsd:appinfo ></xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="id">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Id
> @GeneratedValue(strategy=AUTO) @Column(name="IDCHILD"
> unique="true")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Column(name="DATA"
> unique="true" length="25")</xsd:appinfo></xsd:annotation></xsd:element >
> <xsd:element type="xsd:IDREF" ecore:reference="Parent"
> name="parent" ecore:opposite="m2mbjoin">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@ManyToMany(mappedBy="m2mbjoin" targetEntity="Parent"
> indexed=false)
> @JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
> <!-- ====== Parent definition starts here ====== -->
>
> <!--
> WARNING: I define the parent AFTER the children to be sure that the
> parents are saved before the children!
> If there is no other information available, Teneo saves the objects
> in the order that they are defined.
> -->
>
> <xsd:complexType name="Parent">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">
> @Table(name=PARENT)
> </xsd:appinfo>
> </xsd:annotation>
> <xsd:sequence>
> <xsd:element type="xsd:int" name="id">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">
> @Id
> @GeneratedValue(strategy=AUTO)
> @Column(name="ID" unique="true")
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
>
> <xsd:element type="xsd:string" name="data">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">
> @Column(name="DATA" unique="true" length="25")
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
>
> <!-- Badly formatted for easier comparison. Expand what you're
> interested in -->
> <xsd:element maxOccurs="1" name="o2osparent"
> type="o2osparent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinColumn(name="o2osp")</xsd:appinfo></xsd:annotation> </xsd:element>
>
> <!-- the child does all the work to hold this relationship.
> I can use @PrimaryKeyJoinColumn because the key of the child is the join
> I care about -->
> <xsd:element maxOccurs="1" name="o2oschild"
> type="o2oschild">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @PrimaryKeyJoinColumn</xsd:appinfo></xsd:annotation></xsd:element >
>
> <xsd:element maxOccurs="1" name="o2osjoin"
> type="o2osjoin" minOccurs="0">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@JoinTable(name="o2osjoin_jointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2oschildInvis"
> type="o2oschildInvis">
> <!-- Nothing to annotate on the child => No ability to
> control child column name; -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne</xsd:appinfo></xsd:annotation ></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2oschildEmbed"
> type="O2oschildEmbed">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@Embedded</xsd:appinfo></xsd:annotation ></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2obparent"
> type="o2obparent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinColumn(name="o2obp")</xsd:appinfo></xsd:annotation> </xsd:element>
>
> <xsd:element maxOccurs="1" name="o2obchild"
> type="o2obchild">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToOne(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="o2objoin"
> type="o2objoin">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToOne
> @JoinTable(name="o2objoin_jointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <xsd:element maxOccurs="unbounded" name="o2mschild"
> type="o2mschild">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="unbounded" name="o2msjoin"
> type="o2msjoin">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@OneToMany
> @JoinTable(name="o2msjoinjointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <xsd:element maxOccurs="unbounded" name="o2mschildInvis"
> type="o2mschildInvis">
> <!-- Nothing to annotate on the child => No ability to
> control child column name -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany</xsd:appinfo></xsd:annotation ></xsd:element>
>
> <xsd:element maxOccurs="1" name="o2mschildEmbed1"
> type="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
> @AttributeOverrides({ @AttributeOverride(name="city",
> column=@Column(name="city1")), @AttributeOverride(name="state",
> column=@Column(name="state1"))})</xsd:appinfo></xsd:annotation ></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="o2mschildEmbed2"
> type="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
> @AttributeOverrides({ @AttributeOverride(name="city",
> column=@Column(name="city2")), @AttributeOverride(name="state",
> column=@Column(name="state2"))})</xsd:appinfo></xsd:annotation ></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="o2mschildEmbed3"
> type="o2mschildEmbed">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@Embedded
> @AttributeOverrides({ @AttributeOverride(name="city",
> column=@Column(name="city3")), @AttributeOverride(name="state",
> column=@Column(name="state3"))})</xsd:appinfo></xsd:annotation ></xsd:element>
>
>
> <xsd:element maxOccurs="unbounded" name="o2mbchild"
> type="o2mbchild">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="unbounded" name="o2mbjoin"
> type="o2mbjoin">
> <!-- note: the option mappedBy="parent" means that this is
> controlled by the 'parent' attribute of the CHILD object) -->
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@OneToMany(mappedBy="parent")</xsd:appinfo ></xsd:annotation></xsd:element>
>
>
> <xsd:element maxOccurs="1" name="m2osparent"
> type="m2osparent">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinColumn(name="m2osp")</xsd:appinfo></xsd:annotation> </xsd:element>
>
> <xsd:element maxOccurs="1" name="m2osjoin"
> type="m2osjoin">
> <xsd:annotation><xsd:appinfo source="teneo.jpa">@ManyToOne
> @JoinTable(name="m2osjoinjointable", joinColumns = {
> @JoinColumn(name="id", unique = true) }, inverseJoinColumns = {
> @JoinColumn(name="idChild") }
> )</xsd:appinfo></xsd:annotation></xsd:element>
>
> <!-- WARNING: This association cannot be supported by JRules
> due to lack of support for IDREF types -->
> <xsd:element maxOccurs="unbounded" name="m2mbjoin"
> type="xsd:IDREF" ecore:reference="m2mbjoin" ecore:opposite="parent">
> <xsd:annotation><xsd:appinfo
> source="teneo.jpa">@ManyToMany(indexed=false, targetEntity="m2mbjoin")
> @JoinTable(name="m2mbjoinjointable")</xsd:appinfo></xsd:annotation ></xsd:element>
>
> </xsd:sequence>
> </xsd:complexType>
>
>
> </xsd:schema>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:Two problems @GenericGenerate strategy="foreign" and @ManyToMany
Next Topic:[TENEO] Containment References in Lagacy DB
Goto Forum:
  


Current Time: Fri Apr 26 19:41:52 GMT 2024

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

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

Back to the top