You can add non-unique indices to entities. You add indices to a default database table,
by adding an Index element in the extension XML for that table.
About this task
To add non-unique indices to a default table:
Procedure
-
Copy the <runtime_sandbox>/installed_data/repository/entity/extensions/Extensions.xml.sample
file as <runtime_sandbox>/extensions/global/entities/your_custom_filename.xml
file OR modify your existing extension XML file.
-
Edit the your_custom_filename.xml file to add
non-unique indices as shown in the following example for each table you want to extend. For a
description of the XML attributes, see the table that follows the example.
<!-- element exposed to create index -->
<DBSchema>
<Entities>
<Entity TableName="REQUIRED">
.
.
<Indices>
<Index Name="REQUIRED" AllowCompressedColumns="false">
<Column Name="REQUIRED" />
.
.
</Index>
.
.
</Indices>
.
.
</Entity>
</Entities>
</DBSchema>
Attribute
|
Description
|
Entity
|
TableName
|
Name of the table for which the indices are added, For example,
YFS_ITEM.
|
Entity/Index
|
Name
|
The name of the custom index. Name must start with a prefix EXTN_.
|
AllowCompressedColumns
|
If True, the index is allowed to contain columns
that are marked with CompressionSupported attribute set to True.
|
Entity/Index/Column
|
Name
|
The name of the column for which the index is added. Create a Column Name
for each column for which the index is added.
|
- Create an Index tag for each index that you want to add to the column.
- Extend the corresponding API templates to include the non-unique
indices by following the instructions in Extending API Templates.
- Build and deploy your extensions.