Commit Graph

2456 Commits

Author SHA1 Message Date
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
Simon Ho fae9fd69c0 Update package.json for LB3 release
- Use LTS tag for Juggler@2.x
2016-12-21 00:45:16 -08:00
Simon Ho f6c054e3f4 Merge pull request #1188 from strongloop/add_translation6_2x
Update ko translation file
2016-12-07 09:49:09 -08:00
Candy 70b7b1533d Update ko translation file 2016-12-07 12:01:59 -05:00
Miroslav Bajtoš de70d746e8 Merge pull request #1183 from strongloop/fix/eslint-errors-2x
Back-port fixes for linter errors from master
2016-12-06 15:09:40 +01:00
Miroslav Bajtoš f8da9783bc Back-port fixes for linter errors from master 2016-12-06 10:47:27 +01:00
Candy a1b9b42d11 Merge pull request #1162 from strongloop/add_translation4_2x
Update chinese simplified translation file
2016-11-10 15:19:39 -05:00
Candy d7a5429f52 Update chinese simplified translation file 2016-11-10 12:55:53 -05:00
Amirali Jafarian adcebab371 Merge pull request #1157 from strongloop/1150_backport
Apply style guide to test names
2016-10-28 09:28:56 -04:00
Amir Jafarian 69ce75c662 Apply style guide to test names
*  Apply style guide to test names in test/loopback-dl.test.js
Backport of #1150
2016-10-27 18:02:26 -04:00
Amirali Jafarian 9923ddb29b Merge pull request #1151 from strongloop/backport_1142
Continue _coerce after logical operators
2016-10-26 13:51:08 -04:00
Heath Morrison 552dfc8f24 Continue _coerce after logical operators 2016-10-26 10:14:43 -04:00
Amirali Jafarian c96f471efd Merge pull request #1146 from strongloop/2.x_eslint
2.x eslint
2016-10-19 21:24:56 -04:00
Amir Jafarian e038b28e8c Fix manually 2016-10-19 17:35:26 -04:00
Amir Jafarian a1683fca59 Auto-update by eslint --fix 2016-10-19 17:04:05 -04:00
Amir Jafarian 6acedc3bae update eslintrc according to master branch 2016-10-19 17:01:49 -04:00
Amir Jafarian 342eb866be Update eslint 2016-10-19 16:59:06 -04:00
Miroslav Bajtoš 959a821be5 Merge pull request #1144 from strongloop/feature/parameterize-kvao-tests-2x
test/kvao: add connectorCapabilities options [2.x]
2016-10-19 13:40:28 +02:00
Miroslav Bajtoš 70a1552df8 test/kvao: add connectorCapabilities options
- canExpire
 - canQueryTtl
 - ttlPrecision
 - canIterateKeys
 - canIterateLargeKeySets

These options allow connectors to disable shared tests for features
that are not supported/implemented.
2016-10-19 12:33:21 +02:00
Amirali Jafarian 459fc93012 Merge pull request #1138 from strongloop/doc_validation
Update validations.js
2016-10-14 11:32:55 -04:00
Rand McKinney 09fbfe9410 Update validations.js
Add doc of allowNull options property per #372.
Back-port 9a1ef08
2016-10-14 11:18:17 -04:00
Candy e3d76f7f19 2.53.0
* Fix bug when near filter is used (Amir Jafarian)
2016-10-13 15:35:25 -04:00
Amirali Jafarian 8caf4c8327 Merge pull request #1108 from strongloop/fix_geo_2.x
Fix the bug when near filter is used
2016-10-13 10:39:15 -04:00
Miroslav Bajtoš ff184aec16 2.52.0
* Support {defaultFn: 'shortid'} (#1110) (Simon Ho)
 * Add ilike and nilike operators (#1136) (Simon Ho)
 * Fix JSdoc (Amir Jafarian)
 * Update ja translation file (Candy)
 * Update translation files - round#2 (Candy)
 * Add 'isNewInstance' for updateAttributes (Amir Jafarian)
 * Add globalization strings (Amir Jafarian)
 * Add docs for KVAO (Simon Ho)
 * Skip test temporarily (Loay)
2016-10-13 10:13:27 +02:00
Simon Ho c3eca4025c Support {defaultFn: 'shortid'} (#1110)
- Backport of strongloop/loopback-datasource-juggler#1107 (takeover of
strongloop/loopback-datasource-juggler#1101)
- Squashed relevant commits
2016-10-12 20:58:07 -07:00
Simon Ho a9d381605e Add ilike and nilike operators (#1136)
Closes #633

Backport of #1091
2016-10-12 19:19:31 -07:00
Amir Jafarian fde4c0bfd6 Fix bug when near filter is used 2016-10-11 17:08:42 -04:00
Amirali Jafarian da57136fed Merge pull request #1134 from strongloop/1132_2x
Fix JSdoc
2016-10-11 12:54:48 -04:00
Amir Jafarian 8208e8ab63 Fix JSdoc 2016-10-11 12:21:36 -04:00
Amirali Jafarian 7e8198f88b Merge pull request #1131 from strongloop/add_translation3_2x
Update ja translation file
2016-10-06 15:03:09 -04:00
Candy 35e64d2e0b Update ja translation file 2016-10-06 14:26:46 -04:00
Candy 4d965d2de1 Merge pull request #1119 from strongloop/add_translation2_2x
Update translation files - round#2
2016-09-30 09:54:03 -04:00
Candy b7266bd1cb Update translation files - round#2 2016-09-28 15:32:13 -04:00
Amirali Jafarian 76398b7f45 Merge pull request #1105 from strongloop/newInstance_updateAttributes_2.x
Add 'isNewInstance' for updateAttributes
2016-09-23 15:34:32 -04:00
Amir Jafarian e103b50b63 Add 'isNewInstance' for updateAttributes
* Add 'isNewInstance' to loaded hook for updateAttes
2016-09-23 14:09:44 -04:00
Amirali Jafarian 24eb3d3953 Merge pull request #1104 from strongloop/add_globalization_strings
Add globalization strings
2016-09-21 10:22:50 -04:00
Amir Jafarian 74312c9948 Add globalization strings 2016-09-20 15:18:49 -04:00
Simon Ho 94ca3bcd9d Merge pull request #1100 from strongloop/backport/docs-for-kvao
Backport: Add docs for KVAO
2016-09-19 15:22:39 -07:00
Simon Ho 8edca500c1 Add docs for KVAO
Backport of #1093
2016-09-19 13:45:16 -07:00
Simon Ho d84b481483 Merge pull request #1090 from strongloop/backport/fix-ci-failure-mssql
Backport Skip test temporarily
2016-09-15 11:45:01 -07:00
Loay d324696d2a Skip test temporarily 2016-09-14 22:23:24 -04:00
Miroslav Bajtoš 71d4adb0b0 2.51.0
* Add missing "done" arg in test/kvao/ttl.suite (Miroslav Bajtoš)
 * Support nested queries for arrays (pponugo)
 * Remove expired item before executing expire (Simon Ho)
 * Fix failures for connectors (Amir Jafarian)
 * upsertWithWhere feature support in juggler DAO (Sonali Samantaray)
 * Remove ESLint from dependencies (Simon Ho)
 * Refactor TTL test suite (Simon Ho)
2016-09-12 11:21:14 +02:00
Miroslav Bajtoš f663917fe9 Add missing "done" arg in test/kvao/ttl.suite
Backport #1086
2016-09-08 10:39:47 +02:00