Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
Autoset Fields
Programmer's Guide > OpenAccess ORM Classic (Old API) > Programming With OpenAccess > Mapping > Simple and Reference Fields > Autoset Fields

Glossary Item Box

This documentation article is a legacy resource describing the functionality of the deprecated OpenAccess Classic only. The contemporary documentation of Telerik OpenAccess ORM is available here.

OpenAccess ORM can automatically populate timestamp and increment int fields (e.g., a version number) when new instances are created and/or when existing instances are modified (refer to autoset for more information). Normally, to fill a lastModifiedDate field a call has to be made to the server to retrieve the current date (the time on the client is not trusted). With the autoset option this extra call is not required. Here is an example of using the autoset extension to fill the dateCreated and dateLastModified fields for a class:

Copy Code
<class name="Order">
<field name="dateCreated">
<extension key="autoset" value="created" />
<field name="dateLastModified">
<extension key="autoset" value="both" />