Commit Graph

2498 Commits

Author SHA1 Message Date
Miroslav Bajtoš 1c1b0caa69
2.58.0
* feat: omit default fn for embeds many (jannyHou)
2018-07-31 09:27:34 +02:00
Miroslav Bajtoš e7583da285
Merge pull request #1615 from strongloop/backport-omitDefaultEmbeddedItem
feat: omit default fn for embeds many
2018-07-31 09:25:52 +02:00
jannyHou 9a5bd51db5
feat: omit default fn for embeds many 2018-07-30 12:54:51 +02:00
Miroslav Bajtoš f8c5b257f0
2.57.0
* Add support for Node.js 8.x and 10.x, drop 4.x (Miroslav Bajtoš)
2018-05-18 18:18:56 +02:00
Miroslav Bajtoš cc685989a3
Merge pull request #1584 from strongloop/fix/supported-node-versions
Add support for Node.js 8.x and 10.x, drop 4.x [2.x]
2018-05-18 18:18:14 +02:00
Miroslav Bajtoš b056255ecd
Add support for Node.js 8.x and 10.x, drop 4.x
Also remove a flaky test assertion that reports different results
on different Node.js versions. This assertion has been already
removed on `master` branch (3.x version line).
2018-05-18 17:26:47 +02:00
Kevin Delisle 9917e1d283 2.56.0
* fix unauthorized fk change (#1540) (Taranveer Virk)
 * drop support for node 0.10 / 0.12 (#1541) (Taranveer Virk)
2018-01-19 12:55:59 -05:00
Taranveer Virk 2167e802a9
fix unauthorized fk change (#1540) 2018-01-19 12:48:56 -05:00
Taranveer Virk b26da798a9
drop support for node 0.10 / 0.12 (#1541)
Drop support for Node 0.10/0.12 as it’s not supported by Node and tests
are failing since our dependencies no longer support Node 0.10/0.12
2018-01-19 11:28:31 -05:00
Kevin Delisle 60a47b4439 2.55.3
* fix(model-builder): __data may be null. (#1415) (Samuel Reed)
 * package: use qs@6.5.0 (#1470) (Kevin Delisle)
2017-09-26 16:41:31 -04:00
Samuel Reed 40e278ab96 fix(model-builder): __data may be null. (#1415)
This error was swallowed by strong-remoting try/catch
in eachRemoteFunctionInObject()
2017-09-26 16:37:51 -04:00
Kevin Delisle 7c196af109 package: use qs@6.5.0 (#1470)
Fix for advisory: https://snyk.io/vuln/npm:qs:20170213
2017-08-23 15:16:45 -04:00
Kevin Delisle 83d9b865d5 2.55.2
* Fix #1434 2.55.1 Throws when using where query against "JSON Object or ANY" Type (#1444) (Shing)
 * castPropertyValue: throw on malformed types (Kevin Delisle)
2017-07-28 16:33:46 -04:00
Shing 88771f10fc Fix #1434 2.55.1 Throws when using where query against "JSON Object or ANY" Type (#1444)
* Test for JSON object or any type

* dao.js coercion type.definition existence check
2017-07-28 16:30:49 -04:00
Kevin Delisle 29676f6510 Merge pull request #1441 from strongloop/memory/throw-on-malformed-types
castPropertyValue: throw on malformed types
2017-07-28 16:26:16 -04:00
Kevin Delisle f3b849bb47 castPropertyValue: throw on malformed types 2017-07-28 12:50:51 -04:00
Kevin Delisle e63bbcf9cd 2.55.1
* Catch errors using cb (loay)
 * Recursively cast props on fromDb for memory conn. (nVitius)
 * Recursively coerce nested properties in dao (nVitius)
 * Fix #1079 - Polymorphic hasMany inverse relation (#1296) (Janny)
2017-07-21 14:12:10 -04:00
Loay 9096e0873e Merge pull request #1433 from strongloop/create-update-pass
Catch errors using cb
2017-07-21 12:27:48 -04:00
loay 63f04a28d4 Catch errors using cb 2017-07-21 10:13:16 -04:00
Sakib Hasan 1d8ca908f6 Merge pull request #1361 from nVitius/Fix/2.x/NestedProperties
Fix/2.x/nested properties
2017-07-13 21:34:01 -04:00
nVitius 3df1826730 Recursively cast props on fromDb for memory conn.
In the fromDb step, nested properties weren't being hydrated properly.
This caused an issue with the ability to search on such properties as
Dates. The properties would be hydrated as a String type, and as such,
it was impossible to properly query on them.
2017-07-12 12:51:19 -07:00
nVitius 8ebccb65d1 Recursively coerce nested properties in dao 2017-07-11 12:55:01 -07:00
Janny 6d017c1e34 Fix #1079 - Polymorphic hasMany inverse relation (#1296)
This fixes the polymorphic hasMany inverse relation
not working as expected in include filters.
2017-07-11 15:47:32 -04:00
Kevin Delisle da323964f5 2.55.0
* Backport - Apply hasManyThrough filter on target model (#1404) (Janny)
2017-07-10 16:39:03 -04:00
Janny 2190f2510f Backport - Apply hasManyThrough filter on target model (#1404)
* Apply hasManyThrough filter on target model

* Compatible with mongodb
2017-06-22 16:51:10 -04:00
Kevin Delisle 5a661a064a 2.54.2
* Fix assert as array does not guarantee order (Candy)
 * Fixed empty objList in linkOneToMany fn (#1287) (somename85)
 * remove equality value for user-defined id (#1292) (Matteo Padovano)
 * override collection name for arangodb (#1274) (Matteo Padovano)
 * fix missing findOrCreate error callback (Ryan Graham)
2017-06-13 12:37:24 -04:00
Candy 4ebc421c11 Merge pull request #1367 from strongloop/fix_testcase_order
Fix assert as array does not guarantee order
2017-05-23 13:45:42 -04:00
Candy 3e02e36314 Fix assert as array does not guarantee order 2017-05-05 16:14:17 -04:00
somename85 cbb3f6f98a Fixed empty objList in linkOneToMany fn (#1287) 2017-04-05 10:27:34 -04:00
Matteo Padovano 93b89f3a51 remove equality value for user-defined id (#1292)
Some connector, like arangodb, not support id as Number.
 When `forceId` is set to true and id is set `Model.isValid`
 report error and the field id is not coerced.
2017-04-04 13:15:19 -04:00
Matteo Padovano 570da781b8 override collection name for arangodb (#1274)
Add collection name settings for arangodb database.
Required to pass common tests included in community connector
2017-03-25 18:22:59 -04:00
Ryan Graham e9baea77e0
fix missing findOrCreate error callback
Closes #1226
Resolves #1223

Signed-off-by: Ryan Graham <r.m.graham@gmail.com>
2017-03-16 18:32:47 -07:00
Miroslav Bajtoš 7d45463a22
2.54.1
* fix incorrect engines property in package.json (Ryan Graham)
 * Fix datasource to report connector-loading errors (Miroslav Bajtoš)
 * Add two basic tests for "inq" operator (Miroslav Bajtoš)
2017-03-13 16:16:57 +01:00
Ryan Graham f7af629e96 Merge pull request #1263 from strongloop/fix-engines-2.x
fix incorrect engines property in package.json
2017-03-03 13:08:59 -08:00
Ryan Graham 5cbc3bfae7
fix incorrect engines property in package.json 2017-03-03 12:56:56 -08:00
Miroslav Bajtoš e7274a39dc Merge pull request #1246 from strongloop/backport/fix-connector-loader
Fix datasource to report connector-loading errors
2017-02-06 11:51:22 +01:00
Miroslav Bajtoš af1d959613 Fix datasource to report connector-loading errors
Before this change, when resolving full connector path, all errors were
ignored. As a result, when the connector was installed but not
correctly built (e.g. loopback-connector-db2 which uses a native addon),
a very confusing message was reported by LoopBack.

In this commit, I am fixing the code handling `require()` errors
to ignore only MODULE_NOT_FOUND errors that contain the name
of the required module.
2017-02-06 10:58:44 +01:00
Miroslav Bajtoš cbc8c8efe0 Merge pull request #1234 from strongloop/backport/add-inq-tests
Add two basic tests for "inq" operator
2017-01-20 13:20:49 +01:00
Miroslav Bajtoš 5492e59207 Add two basic tests for "inq" operator 2017-01-20 13:04:28 +01:00
Raymond Feng 26d25d60fd 2.54.0
* Replace deprecated node-uuid with uuid module (Raymond Feng)
 * Coerce array-like objects into arrays (Heath Morrison)
 * Throw error when model relation name is trigger (Brian Schemp)
 * Update package.json for LB3 release (Simon Ho)
2017-01-17 09:29:46 -08:00
Raymond Feng e251f05914 Merge pull request #1227 from strongloop/replace-node-uuid
Replace deprecated node-uuid with uuid module
2017-01-17 09:28:54 -08:00
Raymond Feng 9bfab2b5a2 Replace deprecated node-uuid with uuid module 2017-01-17 09:07:21 -08:00
Miroslav Bajtoš 485ad3ee78 Merge pull request #1219 from strongloop/backport/array-coercion
Coerce array-like objects into arrays
2017-01-10 16:05:13 +01:00
Heath Morrison c62ba21307 Coerce array-like objects into arrays
The query-string parser used by express
https://github.com/ljharb/qs#parsing-arrays
limits the size of arrays that are created from query strings to 20
items. Arrays larger than that are converted to objects using numeric
indices.

This commit fixes the coercion algorithm used by queries to
treat number-indexed objects as arrays. We still maintain a strict
understanding of an "array-like object" to limit the opportunity for
subtle bugs. In particular, the presence of non-index keys is an
indication that the object was not intended to be interpreted as
an array.
2017-01-10 15:11:20 +01:00
Miroslav Bajtoš 553c9448ac Merge pull request #1209 from strongloop/backport/invalid-model-relation-name-2x
Throw error when model relation name is trigger
2017-01-03 11:48:53 +01:00
Brian Schemp d87e3bf8fb Throw error when model relation name is trigger
Defining a model relation with the name "trigger" causes the model not
able to insert records. No error is thrown when a model relation with
the name "trigger" is defined. Adding a check for the model relation
name "trigger" will now throw an error.
2017-01-03 10:41:07 +01:00
Miroslav Bajtoš 4544401368 Merge pull request #1199 from strongloop/release/2.x-lts
Update package.json for LB2-LTS release
2016-12-21 10:45:38 +01:00
Miroslav Bajtoš 5b836bdae0 2.53.1
* Fix HasOne.update to propagate options arg (Miroslav Bajtoš)
 * Update ko translation file (Candy)
 * Back-port fixes for linter errors from master (Miroslav Bajtoš)
 * Update chinese simplified translation file (Candy)
 * Apply style guide to test names (Amir Jafarian)
 * Continue _coerce after logical operators (Heath Morrison)
 * Fix manually (Amir Jafarian)
 * Auto-update by eslint --fix (Amir Jafarian)
 * update eslintrc according to master branch (Amir Jafarian)
 * Update eslint (Amir Jafarian)
 * test/kvao: add connectorCapabilities options (Miroslav Bajtoš)
 * Update validations.js (Rand McKinney)
 * Fix bug when near filter is used (Amir Jafarian)
2016-12-21 10:41:36 +01:00
Miroslav Bajtoš 71ef3dd095 Merge pull request #1201 from strongloop/fix/options-propagation-2x
Fix HasOne.update to propagate options arg
2016-12-21 10:40:29 +01:00
Miroslav Bajtoš 839a2c6c66 Fix HasOne.update to propagate options arg 2016-12-21 10:34:05 +01:00