Please note: this project is inactive since early 2006

 
2.5.5.1 Joins

A join has no equivalent in the object model. In fact, it is one the rare elements (such as the properties defined by tags <primaryKey> and <attributesUsedForLocking>) that only describe the underlying database schema. A full discussion on how relationships should be modeled can be found in the next section. For the moment, we will only describe the xml element <join>.

We already know the every relationship should have at least one join. The exact definition of a join goes like this:

    <relation ...>
      <join sourceAttribute='' destinationAttribute=''/>
    </relation>

The <join> element requires the following two attributes:

sourceAttribute:
the name of an attribute belonging to the enclosing relationship's entity.

destinationAttribute:
the name of an attribute belonging to the destination entity pointed by the relationship, i.e. the entity given by "../relation/@destinationEntity".

It is formatted this way:

<relation 
    name                   = ''   -- relation name
    ...
    destinationEntity      = ''   -- name of destination entity
>
  <!-- unordered content: (join) -->
  <join 
      sourceAttribute = ''      -- name of source attribute, in enclosing entity 
      destinationAttribute = '' -- name of target attribute, in ../@destinationEntity
  />
</relation>

Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted by:SourceForge.net Logo