Association Editor

Use this editor to define relationships between other model objects like classes and complex types.

To call the Association Editor dialog box, use one of the following options:

Use the New Association Images_addAssaciations button on the Model toolbar or on the Model Explorer toolbar.
Alternatively, you can right-click the diagram or a class and select New Association from the Add submenu of the shortcut menu.
Right-click an existing association on the diagram and select Edit in the context menu.

Images_AssociationEditor1toManyCase1

Note that the set of fields displayed in this dialog box depends on the selected type of association.

The following options are available:

Relation Class - specifies the name of the class taking part in the association.

Multiplicity - specifies the multiplicity for the end of the association.

Property Name - specifies the name of the member property of an association.

Generate related property - select this check box to generate the related property in the class.

Constrained - (available for one-to-one associations) specifies that a foreign key constraint on the primary key of the mapped table references the table of the associated class.

Separate Foreign Key - (available for one-to-one associations) specifies that the mapped table has separate foreign key column(s).

Foreign key references - this group of radio buttons indicates that the foreign key references either the Primary key or the Unique property of the corresponding class.

Inverse - (available if the End's multiplicity equals Many) marks the collection as the 'inverse' end of a bidirectional association.

Collection type - (available if the End's multiplicity equals Many) specifies the type of the collection. Can accept the following values: Set, Bag, Map, List, or Array.

Generic - (available if the End's multiplicity equals Many) specifies whether to use a generic collection type.

Index type - (available when the End's multiplicity equals Many, CollectionType is set to IdBag, List, Map, or Array, and Generate related property check box is not selected for the opposite association end) specifies the type of the collection index. Can accept the following values: AnsiChar, AnsiString, Binary, BinaryBlob, Boolean, Byte, Char, CultureInfo, Currency, Date, DateTime, DateTime2, DateTimeOffset, DbTimestamp, LocalDateTime, UtcDateTime, Decimal, Double, Guid, Int16, Int32, Int64, Object, SByte, Serializable, Single, String, StringClog, Ticks, Time, TimeAsTimeSpan, TimeSpan, Timestamp, TrueFalse, Type, UInt16, UInt32, UInt64, YesNo, Classes, Complex types and Enum types.

Join Table - specifies the name of the intermediate association table. Available only for a many-to-many or composite-element mapped association.

Schema - specifies the schema of a join table for a many-to-many or composite-element mapped association.

Component - specifies the name of the component. Available only for a many-to-many or composite-element mapped association.

Columns mapping - this grid serves for column mapping customization.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.