Telerik OpenAccess ORM

Telerik OpenAccess ORM Send comments on this topic.
Property Window
Programmer's Guide > Feature Reference > Tools > Visual Designer > Property Window

Glossary Item Box

The Properties window is not part of the OpenAccess Visual Designer, but it is an important part of the process of creating and editing domain model. The Properties window is used to edit properties of the domain model objects and their members. Clicking an item in the design surface makes it active in the Properties window. You could use this window to view and change the design-time properties of select objects that are located in the designer. The purpose of this topic is to describe the properties available in the Properties window depending on the selected item in the design surface.

In this topic:

Visual Designer Properties

The visual designer environment exposes the following properties (right-click on an empty area in the Visual Designer and select Properties).

  • Description - description used in the code documentation in the generated classes.
  • Fill Color - changes the background color. For more information, please refer to How to: Colorize the Visual Designer Entities.
  • Model Settings - opens the Model Settings dialog. For more information, see Model Settings Dialog.
  • Name - specifies the name of the generated context class.
  • Namespace - specifies the namespace for the generated context class.

Domain Class Properties

A Domain Class item exposes the following properties (select an entity in the visual designer, right-click it and then select Properties).

  • Access Modifier - specifies the access modifier for the current class. It could be Public or Assembly (Internal).
  • Cache Policy - the Cache Policy property is related to the 2nd level cache. When the 2nd level cache is enabled, the Cache Policy property specifies whether objects of that type should be cached or not. The following cache policies are available:
    • NoCache - do not cache instances of this class.
    • CacheOnly - cache instances of this class.
    • CacheAllInstances - cache all instances of this class as soon as an instance is requested. All rows from its table will be read and cached whenever an instance is requested but not found in cache. This may work well for small static tables.
  • Concurrency Member - specifies the class member that is used for concurrency check. For more information, see Concurrency Control.
  • Concurrency Mode - specifies the concurrency mode. For more information, see Concurrency Control. The default Concurrency Mode is Changed. The Concurrency Member is set to Auto, which in this case means that there is no specific concurrency member, as it is not needed for the Changed concurrency mechanism. The following concurrency modes are available:
    • Default - defines that the default value for the optimistic concurrency control strategy will be used by the runtime. The runtime might calculate this value on a later stage depending on the other settings of the meta model or the specific backend used.
    • None - defines that no concurrency checks will be done on the database server.
    • Version - defines that a version column is used to detect concurrent updates. The version number is incremented on every update and the previous version number is included in the where clause. This is the fastest and safest optimistic concurrency control mode. This is the default and suggested concurrency mode.
    • Timestamp - defines that a timestamp column is to be used to detect concurrent updates. The timestamp is set on every update and the previous value is included in the where clause. This may not be safe if updates happen quicker than the resolution of the timestamp field. It is included to support legacy database schemas.
    • Changed - defines that previous values of all changed columns will be included in the where clause. This provides more fine-grained optimistic concurrency control as different transactions may modify different fields of the same instance. This mode can be used when the database schema allows no modifications (adding a version column for example). Float and double fields are excluded as they are not exact (rounding procedures are different across databases and also differ from the way .NET is handling it). 
    • Backend - defines that a backend specific concurrency control mechanism is used.
    • All - defines that the values of all columns (changed or not) will be included in the where clause.
  • Description - specifies the description of the class.
  • Fill Color - changes the background color. For more information, please refer to How to: Colorize the Visual Designer Entities.
  • Identity Mechanism - specifies the identity mechanism (key generator) for the current class. The following identity mechanisms are available:
    • Default - specifies that the default value for the key generator will be used by the runtime.
    • DatabaseServerCalculated (Autoinc) - the primary key column in the database is auto-incremental.
    • Guid - defines the 'Guid' key generator. Your identity field will require Guid values.
    • HighLow - internal identity will be used. Telerik OpenAccess ORM always needs to associate its persistent types with a primary key. If such is not supplied, Telerik OpenAccess ORM uses internal mechanism for creating IDs. This mechanism relies that a certain table (voa_keygen) is presented in your database.
  • Inheritance Modifier - specifies the inheritance modifier. It could be Abstract or Final (Sealed). For more information, see Modeling Inheritance.
  • Kind - specifies the type of access for the persistent type. It could be:
    • Default - specifies that the default value for the data access kind (read/write) will be used by the runtime.
    • ReadWrite - the type allows full access to the data. All CRUD modifications are allowed.
    • InsertOnly - the type allows only reading and inserting operations. No modifications (update or delete) are allowed.
    • ReadOnly - the type is read-only. No CUD modifications (create, update or delete) are allowed.
  • Name - specifies the name of the corresponding class.
  • Namespace - specifies the namespace of the generated class.
  • Outline Color - changes the color of the border. For more information, please refer to How to: Colorize the Visual Designer Entities.
  • Text Color - changes the foreground. For more information, please refer to How to: Colorize the Visual Designer Entities.
  • Update Schema - the Update Schema property is related to the Update Database from Model wizard. For example, the wizard will look for changes in entities with Update Schema property set to true.

Class Property Properties

A domain class  Property Item exposes the following properties (select a domain class property in the visual designer, right-click it and then select Properties).

  • Access Modifier - specifies the access modifier for the current class. It could be: Public, Assembly (Internal), Private.
  • Description - specifies the description of the property.
  • Field Name - the name of the field related to the current property.
  • Identity - a boolean value specifying whether the property is a primary key.
  • Inheritance Modifier - specifies the inheritance modifier. It could be Abstract or Final (Sealed). For more information, see Modeling Inheritance.
  • Kind - specifies the type of access for the property. It could be:
    • Default - a property that is transient and is not saved to the data store or tracked for changes. 
    • Persistent - a property that is saved to the data store and is tracked for changes.
    • PersistentWriteOnly - a write-only property.
    • PersistentReadOnly - a read-only property.
    • CustomBehavior - a property that is not saved to the data store. Typically, the Get accessor calculates the value from other properties, and the Set accessor modifies other properties.
    • Calculated - indicates that the property is backend calculated (computed).
  • Load Behavior - defines the load behavior for the persistent property. The following values are possible:
    • Default - the default behavior. The runtime will decide whether to load it or not based on the type of the property.
    • Lazy - the property marked with this facet will be lazily loaded.
    • Eager - the property marked with this facet will be eagerly loaded.
  • Name - specifies the name of the corresponding property.
  • Nullable - specifies whether the property accepts null values.
  • Type - a CLR type for this property.

Navigational Property Properties

A domain class Navigational Property Item exposes the following properties (select a domain class navigation property in the visual designer, right-click it and then select Properties).

  • Description - specifies the description of the property.
  • Field Name - the name of the field related to the current property.
  • Is Dependent - specifies whether the state of association's end that the current member represents is dependent on the operations applied on the corresponding end of the association. It allows operations like cascading deletes to be executed. For more information, please refer to How to: Perform Cascading Delete.
  • Is Managed - specifies whether association's end integrity is managed by Telerik OpenAccess ORM. This option is used to automatically keep you association in sync. For example, you don't have to worry about setting the CategoryId, if you set the Category object reference of a Product instance (e.g. product.Category = newCategory;). In addition, when you add an object to a collection (e.g. category.Products.Add(newProduct);), the field that corresponds to the CategoryId property of the Product object will be set automatically. For more info, see How to: Insert Objects.
  • Kind - specifies the type of access for the property.
  • Load Behavior - defines the load behavior for the persistent property. The following values are possible:
    • Default - the default behavior. The runtime will decide whether to load it or not based on the type of the property.
    • Lazy - the property marked with this facet will be lazily loaded.
    • Eager - the property marked with this facet will be eagerly loaded.
  • Name - specifies the name of the corresponding property.
  • Nullable - specifies whether the property accepts null values.

Association Properties

An Association Item exposes the following properties (select an association in the visual designer, right-click it and then select Properties).

  • Association Settings - opens the Association Editor dialog.
  • Name - specifies the name of the association.
  • Source Property - allows you to edit the source property (e.g. product.Category).
  • Source Multiplicity - the source multiplicity (read-only).
  • Target Property - allows you to edit the target property (e.g. category.Products).
  • Target Multiplicity - the target multiplicity (read-only).