loopback-datasource-juggler/lib
Miroslav Bajtoš b0b377af0c
Set model constructor name to model name
Rework the code building model constructors to leverage `Function` class
and dynamically emit a constructor function named after the model.

Before this change, all model classes were called "ModelConstructor",
which made debugging difficult.

After this change, a model class for model "User" is called "User.

Because not all valid model names are also valid JavaScript identifiers,
we implement a simple sanitization technique (replacing characters like
"-", "." and ":" with underscore "_") and fall back to legacy
"ModelConstructor" if the model name is still not a valid JS identifier.
2018-01-08 09:37:23 +01:00
..
connectors Fix forceId bug for updateOrCreate 2017-04-18 13:14:35 -04:00
kvao Refactor flush to deleteAll 2017-01-09 14:53:34 -08:00
browser.depd.js Fix manually 2016-08-22 19:20:12 -04:00
dao.js Add a better way to handle transactions 2017-09-06 07:10:57 +02:00
datasource.js Allow new transaction method in postgresql (#1493) 2017-12-12 10:56:42 -05:00
date-string.js Add DateString type 2017-05-01 12:28:59 -04:00
geo.js Fix/geo null (#1334) 2017-04-24 19:28:11 -04:00
hooks.js hooks: add JSDoc for .trigger 2017-05-23 12:12:11 -04:00
include.js include: remove JSDoc refs to recursive calls 2017-05-24 17:10:45 -04:00
include_utils.js Fix manually 2016-08-22 19:20:12 -04:00
introspection.js Fix manually 2016-08-22 19:20:12 -04:00
jutil.js Fix manually 2016-08-22 19:20:12 -04:00
list.js Upgrade eslint-config, fix new violations 2017-02-01 12:45:56 +01:00
mixins.js Fix manually 2016-08-22 19:20:12 -04:00
model-builder.js Set model constructor name to model name 2018-01-08 09:37:23 +01:00
model-definition.js Fix model def column name method (#1224) 2017-04-05 15:12:27 -04:00
model.js Allow passing null to base model ctor 2017-09-28 09:42:30 +09:30
observer.js Fix mixins/validatable docs 2017-06-06 14:21:49 -04:00
relation-definition.js Allow customizing embedded relation property (#1513) 2017-10-31 10:55:54 -04:00
relations.js Fix mixins/validatable docs 2017-06-06 14:21:49 -04:00
scope.js Fix query for related models (#1522) 2017-11-14 14:22:48 -05:00
transaction.js Add a better way to handle transactions 2017-09-06 07:10:57 +02:00
types.js Add DateString type 2017-05-01 12:28:59 -04:00
utils.js Fix bug in utils uniq function (#1526) 2017-12-04 15:39:58 -05:00
validations.js validations: use new regex per evaluation (#1479) 2017-09-01 12:48:29 -04:00