.NET Standard 2.0+
.NET Framework 4.5.2+
.NET Standard 2.0+

IndexedAttribute.AdditionalFields Property

Gets the names of additional columns that participate in index creation.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v20.2.dll


public StringCollection AdditionalFields { get; }
Public ReadOnly Property AdditionalFields As StringCollection

Property Value

Type Description

A collection of string values that specify the names of additional columns.


XPO allows you to define a multi-column index in a persistent object.


XPO does not support tables with multi-column (compound) keys or indexes in ASE databases. To avoid exceptions when connecting to ASE databases containing these tables, use one-column keys or indexes.

In the example below, the IndexedAttribute is applied to the LastName property. The names of other properties are specified as the first parameter (these names are delimited with semicolons). Finally, to make the value combination of these properties unique, the IndexedAttribute.Unique parameter is set to true.

using DevExpress.Xpo;

public class Person : XPObject {
    [Indexed("FirstName;BirthDate", Unique=true)]
    public string LastName {
        get { return fLastName; }
        set { SetPropertyValue(nameof(LastName), ref fLastName, value); }
    string fLastName = string.Empty;

    public string FirstName {
        get { return fFirstName; }
        set { SetPropertyValue(nameof(FirstName), ref fFirstName, value); }
    string fFirstName = string.Empty;

    public DateTime BirthDate {
        get { return fBirthDate; }
        set { SetPropertyValue(nameof(BirthDate), ref fBirthDate, value); }
    DateTime fBirthDate;


Do not include the name of the Indexed attribute's target field to the AdditionalFields list.

See Also