Table of Contents

OrderByAttribute Class

Specifies the default ordering of items in a many-valued association collection.

Remarks

Apply this attribute to a field or property that is also decorated with ManyValuedAssociation. The ordering is applied at the database level (an ORDER BY clause is added to the SELECT statement). It does not reorder items already in memory. Specify one or more class member names (not column names), separated by commas. Append " DESC" (with a space) after a member name to sort descending. To order by a member of an associated object, prefix with the association name and a dot, for example "Customer.Country.Name".

Syntax

Unit: Aurelius.Mapping.Attributes

OrderByAttribute = class(TCustomAttribute);

Constructors

Name Description
Create Creates an OrderByAttribute with the specified member name expression.

Properties

Name Description
MemberNames Gets the member name expression used for ordering the collection.