<onetoone>
The <onetoone> element defines a single-valued association to another entity that has a one-to-one cardinality. Guidewire defines this element in the data model metadata files as the <onetoone> XML subelement. A one-to-one element functions in a similar manner to a foreign key in that it makes a reference to another entity. However, its purpose is to provide a reverse pointer to an entity or object that is pointing at the <onetoone> entity, through the use of a foreign key.
For example, entity A has a foreign key to entity B. You can associate an instance of B with at most one instance of A. Perhaps, there is a unique index on the foreign key column. This then defines a one-to-one relationship between A and B. You can then declare the <onetoone> element on B, to provide simple access to the associated A. In essence, using a one-to-one element creates an array-of-one, with, at most, one element. Zero elements are also possible.
Attributes of <onetoone>
The <onetoone> element contains the following attributes.
|
Description |
Default |
|---|---|---|
|
If |
|
|
If If you deprecate an item, use the description to explain why. For more information, see Data entity subelements. |
|
|
A description of the purpose and use of the field. |
None |
|
Unused. |
|
|
Required. The entity to which this foreign key points. |
None |
|
See Data objects and scriptability for information. |
|
|
This attribute has complex, non-intuitive interactions with data entity relationships. See Interactions of ignoreForEvents attribute with data entity relationships for information on how to use and configure it. Important: Do not confuse the definition of
the ignoreForEvents attribute for the
<onetoone> element with the
definition of the attribute of the same namesake in
<entity> and
<array> elements. Although
they share the same name, the two
ignoreForEvents attributes are near
opposites in effect.
|
|
|
Optional. Specifies the foreign key field that points back to this object. |
None |
|
Required. Specifies the name property on the entity. |
None |
|
Whether the field can contain |
|
|
If
|
|
|
See Data objects and scriptability for information. |
|
|
Whether changes to the entity pointed to by this entity trigger validation. |
|
Subelements of <onetoone>
The <onetoone> element contains the following subelements.
|
Description |
Default |
|---|---|---|
|
See <fulldescription>. |
None |
|
See <tag>. |
None |
