sails.config.models
Your default project-wide model settings. Can also be overridden on a per-model basis by providing a top-level property with the same name in that model definition. For more details, see the conceptual docs on Model Settings. These options are conventionally specified in the config/models.js configuration file.
sails.config.models;
Properties
Property | Type | Default | Details |
---|---|---|---|
attributes |
((object)) | {} |
The basic pieces of information to store about a model. See Attributes. |
migrate |
((string)) | see Model Settings | How & whether Sails will attempt to automatically rebuild the tables/collections/etc. in your schema |
connection |
((string)) | "localDiskDb" |
The default database connection any given model will use without a configured override |
autoPK |
((boolean)) | true |
Toggle the automatic definition of a primary key in your model |
autoCreatedAt |
((boolean)) | true |
Toggle the automatic definition of a property createdAt in your model |
autoUpdatedAt |
((boolean)) | true |
Toggle the automatic definition of a property updatedAt in your model |
tableName |
((string)) | identity | Used to specify database table name for the model |
dynamicFinders |
((boolean)) | true |
Toggle the automatic creation of Dynamic Finders |