Class RelationsTableInfo
Table 'relations': Instance of a relation, in principle between any two records, as long as they are defined in RelationDefinition. All instances of relations are held in this table; their definitions are in the RelDef table (RelDef + RelTarg define which relations you can have, this table contains the relations the user has actually entered). From 6.1 all links between appointments, sales and documents are also stored in this tabel.
Implements
Inherited Members
Namespace: SuperOffice.CRM.Data
Assembly: SoDataBase.dll
Syntax
[DatabaseTable("relations")]
public class RelationsTableInfo : TableInfo, ICloneable
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Fields
DictionaryTableName
Conceptual name of table Relations in the database dictionary: relations
Declaration
public const string DictionaryTableName = "relations"
Field Value
| Type | Description |
|---|---|
| string |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Properties
AssociateId
Field 'associateId' in table 'relations': Dictionary type FK, target: Associate, .NET type: int
Owner of this relation recordDeclaration
public Int32FieldInfo AssociateId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
AssociateId_InnerJoin_Associate
Generated join from the foreign key AssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> AssociateId_InnerJoin_Associate { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoin<AssociateTableInfo> |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Definition
Definition of the table as described in the deployed runtime dictionary
Declaration
public override SoTable Definition { get; }
Property Value
| Type | Description |
|---|---|
| SoTable |
Overrides
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
DestinationRecord
Field 'destination_record' in table 'relations': Dictionary type RecordId, .NET type: int
Actual target recordDeclaration
public Int32FieldInfo DestinationRecord { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
DestinationTable
Field 'destination_table' in table 'relations': Dictionary type TableNumber, .NET type: short
Actual target tableDeclaration
public UInt16FieldInfo DestinationTable { get; }
Property Value
| Type | Description |
|---|---|
| UInt16FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
DictionaryTableNumber
Table number for table Relations in the database dictionary; potentially changes between databases, but always the same over the lifetime of any single database
Declaration
public int DictionaryTableNumber { get; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
EndDate
Field 'endDate' in table 'relations': Dictionary type DateTime, .NET type: DateTime
End date of validityDeclaration
public DateTimeFieldInfo EndDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
GroupIdx
Field 'group_idx' in table 'relations': Dictionary type FK, target: UserGroup, .NET type: int
User group owning this relationDeclaration
public Int32FieldInfo GroupIdx { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
GroupIdx_InnerJoin_UserGroup
Generated join from the foreign key GroupIdx in this table, to its target table UserGroupTableInfo.
Declaration
public TargetedInnerJoin<UserGroupTableInfo> GroupIdx_InnerJoin_UserGroup { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoin<UserGroupTableInfo> |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Registered
Field 'registered' in table 'relations': Dictionary type UtcDateTime, .NET type: DateTime
Registered whenDeclaration
public DateTimeFieldInfo Registered { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
RegisteredAssociateId
Field 'registered_associate_id' in table 'relations': Dictionary type FK, target: Associate, .NET type: int
Registered by whomDeclaration
public Int32FieldInfo RegisteredAssociateId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
RegisteredAssociateId_InnerJoin_Associate
Generated join from the foreign key RegisteredAssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> RegisteredAssociateId_InnerJoin_Associate { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoin<AssociateTableInfo> |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
RelFlags
Field 'relFlags' in table 'relations': Dictionary type UInt, .NET type: uint
Relation flags, meaning as yet unspecifiedDeclaration
public FieldInfo RelFlags { get; }
Property Value
| Type | Description |
|---|---|
| FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
RelationId
Field 'relation_id' in table 'relations': Dictionary type PK, .NET type: int
Primary keyDeclaration
public Int32FieldInfo RelationId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Relcomment
Field 'relcomment' in table 'relations': Dictionary type String[255], .NET type: string
Comment for relationDeclaration
public StringFieldInfo Relcomment { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
ReldefId
Field 'reldef_id' in table 'relations': Dictionary type FK, target: RelationDefinition, .NET type: int
Reference to definitionDeclaration
public Int32FieldInfo ReldefId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
ReldefId_InnerJoin_RelationDefinition
Generated join from the foreign key ReldefId in this table, to its target table RelationDefinitionTableInfo.
Declaration
public TargetedInnerJoin<RelationDefinitionTableInfo> ReldefId_InnerJoin_RelationDefinition { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoin<RelationDefinitionTableInfo> |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Reversed
Field 'reversed' in table 'relations': Dictionary type UShort, .NET type: short
Is direction reversed relative to definitionDeclaration
public UInt16FieldInfo Reversed { get; }
Property Value
| Type | Description |
|---|---|
| UInt16FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
RuntimeDefinition
Definition of the table as described in the deployed runtime dictionary
Declaration
[Obsolete("Use instance property Definition or static member DictionaryTableNumber", true)]
public static SoTable RuntimeDefinition { get; }
Property Value
| Type | Description |
|---|---|
| SoTable |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
SourceRecord
Field 'source_record' in table 'relations': Dictionary type RecordId, .NET type: int
Actual source recordDeclaration
public Int32FieldInfo SourceRecord { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
SourceTable
Field 'source_table' in table 'relations': Dictionary type TableNumber, .NET type: short
Actual source tableDeclaration
public UInt16FieldInfo SourceTable { get; }
Property Value
| Type | Description |
|---|---|
| UInt16FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
StartDate
Field 'startDate' in table 'relations': Dictionary type DateTime, .NET type: DateTime
Start date of validityDeclaration
public DateTimeFieldInfo StartDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Updated
Field 'updated' in table 'relations': Dictionary type UtcDateTime, .NET type: DateTime
Last updated whenDeclaration
public DateTimeFieldInfo Updated { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
UpdatedAssociateId
Field 'updated_associate_id' in table 'relations': Dictionary type FK, target: Associate, .NET type: int
Last updated by whomDeclaration
public Int32FieldInfo UpdatedAssociateId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
UpdatedAssociateId_InnerJoin_Associate
Generated join from the foreign key UpdatedAssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> UpdatedAssociateId_InnerJoin_Associate { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoin<AssociateTableInfo> |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
UpdatedCount
Field 'updatedCount' in table 'relations': Dictionary type UShort, .NET type: short
Number of updates made to this recordDeclaration
public UInt16FieldInfo UpdatedCount { get; }
Property Value
| Type | Description |
|---|---|
| UInt16FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
Methods
IdxDestinationTable(short)
Shortcut method for looking up using the database index DestinationTable, which spans the following fields:
| Field | Description |
|---|---|
| DestinationTable | Actual target table |
Declaration
public Restriction IdxDestinationTable(short destinationTable)
Parameters
| Type | Name | Description |
|---|---|---|
| short | destinationTable |
Returns
| Type | Description |
|---|---|
| Restriction |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
IdxDestinationTableDestinationRecord(short, int)
Shortcut method for looking up using the database index DestinationTableDestinationRecord, which spans the following fields:
| Field | Description |
|---|---|
| DestinationTable | Actual target table |
| DestinationRecord | Actual target record |
Declaration
public Restriction IdxDestinationTableDestinationRecord(short destinationTable, int destinationRecord)
Parameters
| Type | Name | Description |
|---|---|---|
| short | destinationTable | |
| int | destinationRecord |
Returns
| Type | Description |
|---|---|
| Restriction |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
IdxSourceTable(short)
Shortcut method for looking up using the database index SourceTable, which spans the following fields:
| Field | Description |
|---|---|
| SourceTable | Actual source table |
Declaration
public Restriction IdxSourceTable(short sourceTable)
Parameters
| Type | Name | Description |
|---|---|---|
| short | sourceTable |
Returns
| Type | Description |
|---|---|
| Restriction |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().
IdxSourceTableSourceRecord(short, int)
Shortcut method for looking up using the database index SourceTableSourceRecord, which spans the following fields:
| Field | Description |
|---|---|
| SourceTable | Actual source table |
| SourceRecord | Actual source record |
Declaration
public Restriction IdxSourceTableSourceRecord(short sourceTable, int sourceRecord)
Parameters
| Type | Name | Description |
|---|---|---|
| short | sourceTable | |
| int | sourceRecord |
Returns
| Type | Description |
|---|---|
| Restriction |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetRelationsInfo().