Entity Developer supports two types of primary keys (identities) in data models: simple primary keys and composite primary keys (identities composed of multiple properties).
A simple primary key (also called single field identity in Telerik Data Access terminology) consists of a single property. To define a property as a simple primary key:
A composite primary key (also called composite identity in Telerik Data Access terminology) consists of multiple properties within a single class. When using composite primary keys:
Generators are special mechanisms used to automatically generate values for primary key fields, particularly for numeric sequences. Entity Developer for Telerik Data Access provides several generator types that use either database sequences, identity fields, or special algorithms.
| Generator | Description |
|---|---|
| Default | The generator used for the whole model. The default identity generator for all model properties can be configured in the model properties and overridden for individual properties. |
| Autoinc | Uses the AUTOINC database generator. |
| Guid | Generates a new System.Guid as the identifier. |
| IncrementalGuid | Generates a Guid that is greater than any previously generated Guid for the database. Telerik Data Access uses a special table (default name: voa_keygen) for this generator. You can customize the table name in the model settings on the Configuration page under the HighLow Key Generator group. |
| Hilo | Uses a hi/lo algorithm to efficiently generate identifiers of any integral type. This is the default generator in Telerik Data Access when no other generator is specified. Telerik Data Access uses a special table (default name: voa_keygen) for this generator. You can customize the table name in the model settings on the Configuration page under the HighLow Key Generator group. |
| Verify | Uses the Verify key generator. |