Update LDL doc for the strict mode

This commit is contained in:
Raymond Feng 2013-09-16 10:59:12 -07:00
parent 38705a42ee
commit 77952d5e43
1 changed files with 12 additions and 3 deletions

View File

@ -177,8 +177,15 @@ properties:
There are a set of options to control the model definition.
- strict:
- true: Only properties defined in the model are accepted. This is the default.
- false: The model will be an open model. Unknown properties are accepted as well.
- true: Only properties defined in the model are accepted. Use this
mode if you want to make sure only predefined properties are accepted.
- false: The model will be an open model. All properties are accepted,
including the ones that not predefined with the model. This mode is useful
if the mobile application just wants to store free form JSON data to
a schema-less database such as MongoDB.
- undefined: Default to false unless the data source is backed by a
relational database such as Oracle or MySQL.
- idInjection:
- true: An `id` property will be added to the model automatically
@ -309,6 +316,8 @@ For example,
The composite id is (productId, locationId) for an inventory model.
**Note: Composite ids are NOT supported as query parameters in REST APIs yet.**
#### Property documentation
* doc: Documentation of the property
@ -439,4 +448,4 @@ model to mix in one or more other models. For example,
var TimeStamp = modelBuilder.define('TimeStamp', {created: Date, modified: Date});
var Group = modelBuilder.define('Group', {groups: [String]});
User.mixin(Group, TimeStamp);
User.mixin(Group, TimeStamp);