WhereAttribute Class
Specifies a SQL expression appended to the WHERE clause when retrieving entities or items of a many-valued association.
Remarks
When applied to a class, the filter is added to every SQL statement that retrieves entities of that class, including associations from other entities. When applied to a many-valued association field or property, the filter applies only to that collection.
Multiple Where attributes on the same target are combined with AND.
You may use property names enclosed in curly braces (e.g., {Deleted}) and Aurelius will translate them to the correct alias.columnname form.
The SQL clause is injected directly into the generated SQL, so it must be valid for the target database dialect.
Syntax
Unit: Aurelius.Mapping.Attributes
WhereAttribute = class(TCustomAttribute);
Constructors
| Name | Description |
|---|---|
| Create | Creates a WhereAttribute with the specified SQL filter expression. |
Properties
| Name | Description |
|---|---|
| SqlClause | Gets the SQL expression used as an additional WHERE condition. |