Commit Graph

39 Commits

Author SHA1 Message Date
Dimitris Xalatsis 095ddd654e
Add __parent reference to embedded models
Add a new hidden property `__parent` that's automatically set on all
instances of embedded models.

For backwards compatibility, this feature is not enabled by default.
You can turn it on by adding the following line to `server/server.js`
file:

    app.registry.modelBuilder.settings.parentRef = true;
2020-04-17 13:35:42 +02:00
Dimitris Halatsis 8919115439
Move List.prototype.toItem out of inner init (#1828) 2020-03-18 12:52:35 -04:00
Jeremy Nagel b328934b6c [BUGFIX] Fix issue with with array constructor
- You can do new Array(4) to generate an array with 4 empty items
- Doing the same with list caused an error
- This broke lodash.deepclone
- This PR restores compatibility with the array constructor

Fixes #1798
2019-12-06 10:13:27 +11:00
Agnes Lin de4718d5b8 chore: update copyrights years (#1737) 2019-05-08 11:45:37 -04:00
biniam 1534392c62 fix: coerce date array properties 2019-04-16 10:50:54 -04:00
Hage Yaapa 80d8fcd8b1 feat: support array within array 2019-03-07 15:58:26 +05:30
Miroslav Bajtoš 422ec9ad4f
autofix eslint errors 2018-12-07 16:46:15 +01:00
Raymond Feng 7eec7e4e34 Allow List to take items as instances of a class 2018-09-17 08:22:21 -07:00
Raymond Feng 2b4b44292a Fix tests to ensure compatibility w/ should@10 2018-05-24 14:21:12 -07:00
Miroslav Bajtoš d809260799 Upgrade eslint-config, fix new violations 2017-02-01 12:45:56 +01:00
Amir Jafarian aec678d252 Fix manually 2016-08-22 19:20:12 -04:00
Amir Jafarian a5429dc026 Update globalization 2016-08-03 14:48:35 -04:00
Amir Jafarian f2f9b4a6f8 Use g.f instead of utils.format 2016-08-03 10:47:40 -04:00
Amir Jafarian 4ce5b5d3a0 Support for globalization 2016-07-28 15:20:18 -04:00
Miroslav Bajtoš 39e04a1756 eslint --fix 2016-04-05 15:25:34 +02:00
Ryan Graham c467b43c38 Insert copyright headers 2016-04-04 18:14:03 -07:00
Pradnya Baviskar be37fb4388 Return 400 when client provides an incorrect value 2015-02-05 16:58:42 +05:30
Christian Enevoldsen d39f539413 adds support for protected properties. 2015-01-20 20:58:52 +01:00
Fabien Franzen dad8266837 Prevent failure with null in List toObject 2014-08-18 07:28:33 +02:00
Raymond Feng 27f4c1b7b4 Fix the error msg 2014-06-19 15:09:19 -07:00
Ritchie Martori aea5836569 Add hidden property support 2014-04-11 11:39:57 -07:00
Raymond Feng 510f5ef6ac Check the Array type
See https://github.com/strongloop/loopback-connector-mongodb/issues/21
2014-03-03 15:52:49 -08:00
Raymond Feng 12a624d99c Rewrite the List class for typed array 2014-02-14 10:41:00 -08:00
Raymond Feng 2b8c1ebaee Reformat the code 2014-01-24 09:09:53 -08:00
Raymond Feng 8e01e17bdb Add support for nesting objects with an array 2013-07-12 18:59:43 -07:00
Raymond Feng 09ab8356b8 Fix the array data population 2013-07-12 12:36:14 -07:00
Ritchie Martori dbd5efed50 Revert adapter serialization. Remove geo point distance indicator. 2013-07-01 13:16:51 -07:00
Anatoliy Chakkaev c4d4b68413 Datatypes casting 2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev f56cbaa150 Added map-reduce and find methods to list 2013-04-03 23:52:19 +04:00
Anatoliy Chakkaev ccffd10a58 Added filter, fix [] as type 2013-03-18 23:45:34 +04:00
Anatoliy Chakkaev 56db693454 List support for non-object values 2013-02-19 16:33:09 +08:00
Anatoliy Chakkaev 4d75cb74d7 Add some array methods for List 2013-02-18 16:18:09 +08:00
Anatoliy Chakkaev e9b7e89ee9 Accept adapter as first argument of Schema constructor 2013-01-19 20:50:53 +07:00
Anatoliy Chakkaev c252926f34 Docs and style in lib/list 2012-11-20 18:37:04 +07:00
Anatoliy Chakkaev cca1cbb3f8 Not strict equal when matching ids in embedded lists 2012-09-20 16:02:48 +04:00
Anatoliy Chakkaev ffbc9482f7 Make property configurable to pass tests 2012-09-11 23:53:19 +04:00
Anatoliy Chakkaev c8b8012e28 List API improvements 2012-09-11 23:22:55 +04:00
Anatoliy Chakkaev e0f5f45b05 List improvements 2012-09-11 20:51:31 +04:00
Anatoliy Chakkaev e938a814e8 Added typed lists support 2012-09-10 19:57:21 +04:00