Commit Graph

2641 Commits

Author SHA1 Message Date
Rand McKinney f1ef519a5c Merge pull request #1236 from strongloop/update-readme
Update README.md
2017-03-20 14:54:39 -07:00
Rand McKinney aa917089b9 Update README.md 2017-03-20 14:33:17 -04:00
Diana Lau cc3fb8e3f1 Merge pull request #1270 from strongloop/add-error-callback
FindOrCreate missing error callback
2017-03-20 15:42:20 +00:00
Diana Lau eb2cb315e6 FindOrCreate missing error callback 2017-03-20 10:32:09 -04:00
Dimitris 6f8ecfdf5c Fixes #1230 coerceArray converts empty Objects (#1269) 2017-03-20 10:05:11 -04:00
Matteo Padovano 1f52d23d67 override collection name for arangodb (#1243)
Add collection name settings for arangodb database.
Required to pass common tests included in community connector
2017-03-20 09:01:16 -04:00
Rémi Bèges 55128f0c9b Add test coverage for `validatesInclusionOf` (#1249)
* Fix indentation

* Improve tests formatting

* Use instanceof and should.match
2017-03-18 06:50:10 -04:00
Kevin Delisle edc1fd3d83 Merge pull request #1266 from strongloop/catch-error-on-updateAttribute
dao: catch sync errors on setAttributes
2017-03-16 18:38:10 -04:00
Kevin Delisle 248aaf0541 dao: catch errors on Model creation in find 2017-03-16 17:26:53 -04:00
Kevin Delisle a6c5802940 dao: catch sync errors on setAttributes
Wrap inst.setAttributes in try-catch to prevent synchronous errors
from crashing the application.
2017-03-16 17:26:53 -04:00
Loay 1808bd3703 Merge pull request #1267 from strongloop/translationTypo
Update error message
2017-03-16 11:18:24 -04:00
Loay 46318d2094 Update error message 2017-03-16 11:02:08 -04:00
Loay 15209b87b9 Merge pull request #1265 from strongloop/orderQuery
Fix Order query test case
2017-03-15 15:24:25 -04:00
Loay 557a2e48d2 Fix Order query test case 2017-03-15 14:45:36 -04:00
dhmlau 33d0475d82 Merge pull request #1264 from strongloop/doc/discovermodeldefinitions-options
doc: Add option for discoverModelDefinitions
2017-03-15 02:40:54 +00:00
jannyHou 7373e1ae31 Doc:Add option for discoverModelDefinitions 2017-03-14 21:51:30 -04:00
Rémi Bèges 11c2a19ad2 Add tests for validatesExclusionOf (#1248) 2017-03-08 10:24:18 -05:00
Kevin Delisle 76c73d55d2 Merge pull request #1196 from Overdrivr/improve-id-update-error-message
Fix error message formatting when trying to update an id property
2017-02-16 13:38:41 -05:00
Rémi Bèges 9afaa9a66e Fix id update error message formatting
Error is raised when trying to update an id property while forceId
is set to true
2017-02-15 18:26:32 +01:00
Janny 0cf863a483 Merge pull request #1239 from strongloop/feature/query-nested-property
Support query nested properties
2017-02-14 16:37:27 -05:00
jannyHou 8b1100e3ed Add test case for all connectors 2017-02-14 14:01:44 -05:00
Loay 22cf48bd21 Merge pull request #1245 from strongloop/duplicate-code
Add proper statusCode for duplicate
2017-02-09 10:06:30 -05:00
Loay 9541bb5f15 Add proper statusCode for duplicate 2017-02-08 23:52:14 -05:00
Miroslav Bajtoš ca406b6d24 Merge pull request #1241 from strongloop/fix/connector-loader
Fix datasource to report connector-loading errors
2017-02-06 10:56:50 +01:00
Miroslav Bajtoš e8a977f55b 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-03 20:29:11 +01:00
Loay ad9934159b Merge pull request #1240 from strongloop/replaceById-test
Ensure replaceById returns 404 when id not found
2017-02-01 13:11:26 -05:00
Loay 4bd03a25f2 Ensure replaceById returns 404 when id not found 2017-02-01 11:57:54 -05:00
Miroslav Bajtoš c509a9f7fe Merge pull request #1242 from strongloop/upgrade/eslint-config
Upgrade eslint-config, fix new violations
2017-02-01 16:34:32 +01:00
Miroslav Bajtoš d809260799 Upgrade eslint-config, fix new violations 2017-02-01 12:45:56 +01:00
Miroslav Bajtoš 121afda79b Fix option propagation in relation methods
- EmbedsMany.prototype.remove
 - EmbedsMany.prototype.add
2017-01-31 16:10:56 +01:00
Miroslav Bajtoš b781dae339 Merge pull request #979 from mrbatista/master
Refactor logic of options.allowExtendedOperators
2017-01-30 14:35:44 +01:00
Matteo Padovano 733ad1a024 Refactor logic of options.allowExtendedOperators
Implement logic to allowExtendedOperators options
per request, per Model and Datasource.
2017-01-30 00:05:56 +01:00
Loay 023856cbe9 Merge pull request #1210 from strongloop/forceId-true
Fix forceId validation error
2017-01-27 00:08:28 -05:00
Loay 44a5a7ad81 Fix forceId validation error 2017-01-26 16:52:19 -05:00
Miroslav Bajtoš ae07480f45 Merge pull request #1232 from strongloop/add-inq-tests
Add two basic tests for "inq" operator
2017-01-20 12:58:50 +01:00
Raymond Feng cf7f05db8b 3.2.0
* Fix should dep (Raymond Feng)
 * Upgrade dependencies to remove npm install warnings (Raymond Feng)
 * Add missing return for KVAO delete all (Simon Ho)
 * Add missing return in KVAO keys test suite (Simon Ho)
 * Detect deleteAll support in KVAO tests (Simon Ho)
 * Coerce array-like objects into arrays (Heath Morrison)
 * Refactor flush to deleteAll (Simon Ho)
 * Upgrade eslint-config to 7.x (Miroslav Bajtoš)
 * Throw error when model relation name is trigger (Brian Schemp)
 * Add flush operation to KVAO (Simon Ho)
 * Fix block padding (Siddhi Pai)
2017-01-19 10:28:38 -08:00
Raymond Feng 315c2774cb Fix should dep 2017-01-19 10:27:48 -08:00
Raymond Feng 6d7ae88a94 Merge pull request #1228 from strongloop/upgrade-deps
Upgrade dependencies to remove npm install warnings
2017-01-19 10:24:57 -08:00
Miroslav Bajtoš b5d03b845f Add two basic tests for "inq" operator 2017-01-19 13:33:39 +01:00
Raymond Feng 0c76bd21b9 Upgrade dependencies to remove npm install warnings 2017-01-17 09:45:51 -08:00
Simon Ho 5a7283386c Merge pull request #1222 from strongloop/fix-missing-return-for-kvao-delete-all
Add missing return for KVAO delete all
2017-01-13 00:44:56 -08:00
Simon Ho 9a0d34a7a3 Add missing return for KVAO delete all 2017-01-13 00:19:10 -08:00
Simon Ho 22f2abf225 Merge pull request #1220 from strongloop/add-kvao-test-missing-return
Add missing return in KVAO keys test suite
2017-01-11 20:59:26 -08:00
Simon Ho 188fb10c96 Add missing return in KVAO keys test suite 2017-01-11 19:35:37 -08:00
Simon Ho 736a4ad185 Merge pull request #1218 from strongloop/clear-cache-if-delete-all-supported
Detect deleteAll support in KVAO tests
2017-01-11 19:31:22 -08:00
Simon Ho 0b93c5c6dd Detect deleteAll support in KVAO tests
Clear CacheItem data between tests if connector supports `deleteAll`.
Tests fail with 501 if this check is not used.
2017-01-11 16:30:33 -08:00
Miroslav Bajtoš b530ec2a65 Merge pull request #1143 from doublemarked/hm/coerce-array-like-objects-as-arrays
Coercing conditions with array-like objects into arrays
2017-01-10 15:03:13 +01:00
Heath Morrison 2377792c22 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 14:46:41 +01:00
Simon Ho 6f2a075bee Merge pull request #1214 from strongloop/refactor/kvao-flush
Refactor/kvao flush to deleteAll
2017-01-09 18:31:50 -08:00
Simon Ho 2320df1227 Refactor flush to deleteAll
- Rename `flush` to `deleteAll`
- Add `delete`
- Detect `delete/deleteAll` before running downstream test suites
- Fall back to unoptimized `deleteAll` when connector does not support
  `deleteAll` but supports `delete`
- Return 501 for connectors not supporting `delete` or `deleteAll`
2017-01-09 14:53:34 -08:00