Commit Graph

322 Commits

Author SHA1 Message Date
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
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 5cbc3bfae7
fix incorrect engines property in package.json 2017-03-03 12:56:56 -08: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
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 9bfab2b5a2 Replace deprecated node-uuid with uuid module 2017-01-17 09:07:21 -08: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
Simon Ho fae9fd69c0 Update package.json for LB3 release
- Use LTS tag for Juggler@2.x
2016-12-21 00:45:16 -08:00
Amir Jafarian 342eb866be Update eslint 2016-10-19 16:59:06 -04:00
Candy e3d76f7f19 2.53.0
* Fix bug when near filter is used (Amir Jafarian)
2016-10-13 15:35:25 -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
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
Simon Ho 25345d56eb Remove ESLint from dependencies
This a duplicate entry as the correct ESLint configs are already listed
as devDepencies.
2016-09-04 12:20:47 -07:00
Miroslav Bajtoš b95d5ca182 2.50.0
* test/memory: remove dummy findOrCreate impl (Miroslav Bajtoš)
 * Implement `notify` for find method (Amir Jafarian)
 * kvao: implement key filter (Miroslav Bajtoš)
 * kvao: add iterateKeys() and keys() (Miroslav Bajtoš)
 * Globalize KeyValue Memory connector (Simon Ho)
 * test: Rename KVAO get test suite (Simon Ho)
2016-08-26 10:08:32 +02:00
Miroslav Bajtoš ab47ecfbab kvao: implement key filter 2016-08-18 10:30:55 +02:00
Miroslav Bajtoš 24a9a96a26 kvao: add iterateKeys() and keys()
Add a core implementation of KVAO.iterateKeys() which returns an
AsyncIterator, inspired by
 - https://github.com/tc39/proposal-async-iteration
 - https://www.npmjs.com/package/async-iterators

This way we can safely iterate even large sets of data.

Also add KVAO.keys(), a sugar API converting the result of iterateKeys()
into a single array.
2016-08-18 10:30:53 +02:00
Miroslav Bajtoš 2fb6a96d77 2.49.0
* Fix error message for missing global.Promise (Miroslav Bajtoš)
 * Add TTL for KeyValue related features (Simon Ho)
 * test/kvao: setup global.Promise on Node v0.10 (Miroslav Bajtoš)
 * kv-memory: fix crash in regular cleanup (Miroslav Bajtoš)
 * Backport globalization (Amir Jafarian)
2016-08-16 16:36:13 +02:00
Amir Jafarian 9da0e501da Backport globalization
Backport loopback-datasource-juggler#1022,
loopback-datasource-juggler#1024,
loopback-datasource-juggler#1026
2016-08-09 21:52:11 -04:00
Amir Jafarian b4d2d19ac6 2.48.0
* Return error if connector does not implement (Amir Jafarian)
 * kvao: return 404 when expiring unknown key (Miroslav Bajtoš)
 * Update doc for `validatesFormatOf` (Amir Jafarian)
 * Implement KeyValue API and memory connector (Miroslav Bajtoš)
 * Fix test case typo (Amir Jafarian)
 * Remove unused variables in model.js (Amir Jafarian)
 * Add test for updateOrCreate (Amir Jafarian)
 * Declare `definition` (Amir Jafarian)
 * Add test to catch invalid date property (Supasate Choochaisri)
2016-08-09 18:43:11 -04:00
Miroslav Bajtoš 4e5ae72eef 2.47.0
* Ensure stable order of items in DAO.find() (Miroslav Bajtoš)
 * give options to validators #984 (RobinBiondi)
 * Update datasource.js (Amir Jafarian)
 * Give warning if PK is changed in hooks (Amir Jafarian)
 * Persist changes on parent for embedsOne (Dimitris Halatsis)
2016-07-14 14:02:12 +02:00
Raymond Feng baef033115 2.46.1
* fix (Miroslav Bajtoš)
 * Retun err for UPSERT if the connector returns err (Amir Jafarian)
 * Fix error message (Amir Jafarian)
 * Add test's description (Amir Jafarian)
 * ModelBuilder: add new setting strictEmbeddedModels (Dimitris Halatsis)
 * Fix incompatibility between different connectors PR#938 (Amir Jafarian)
 * travis: add v4, v6, drop io.js (Miroslav Bajtoš)
 * Backport ESLint from master (Simon Ho)
 * Set ESLint as devdep (Simon Ho)
 * Use mocha instead of Makefile for testing (Simon Ho)
 * Implement operation hooks for EmbedsMany methods (Miroslav Bajtoš)
 * Implement operation hooks for EmbedsOne methods (Miroslav Bajtoš)
 * eslint config 2.0 + remove extra empty lines (Miroslav Bajtoš)
 * Fix eslint errors in memory connector (Miroslav Bajtoš)
 * Run `eslint --fix` with config from master (Miroslav Bajtoš)
 * Test coverages for hashed password (Amir Jafarian)
 * Fix `forceId` check for `replaceByIds` PR#896 (Amir Jafarian)
 * test: extract hook-monitor helper (Miroslav Bajtoš)
 * test: extract uid-generator helper (Miroslav Bajtoš)
 * test: extract context-test-helpers (Miroslav Bajtoš)
 * Define `patch` aliases (Amir Jafarian)
2016-06-03 14:53:00 -07:00
Simon Ho 65d6d6a508 Backport ESLint from master 2016-05-20 17:35:23 +02:00
Simon Ho ee6c0ad461 Set ESLint as devdep 2016-05-10 13:37:44 -07:00
Simon Ho 4c7d862cee Use mocha instead of Makefile for testing 2016-05-10 12:06:34 -07:00
Miroslav Bajtoš 7eee0afb52 2.46.0
* Insert copyright headers (Miroslav Bajtoš)
 * Relicense as MIT only (Miroslav Bajtoš)
 * Fix Mongo compatibility issue (Amir Jafarian)
 * Add automigrate to setup tables for replace test cases (Amir Jafarian)
 * Remove next tag (2.x) (Amir Jafarian)
 * Allow test folder to be published (Amir Jafarian)
 * Fix tests for mysql (Amir Jafarian)
 * Add forgotten unit test (Miroslav Bajtoš)
 * Improve error message on connector init error (Miroslav Bajtoš)
 * Update describe-operation-hooks (Miroslav Bajtoš)
 * Fix missing connector error msg for db2, cloudant for 2.x (Candy)
 * Implementtaion of replace (Amir Jafarian)
2016-04-07 09:12:48 +02:00
Amir Jafarian de9e0e81b2 Remove next tag (2.x) 2016-03-29 10:58:11 -04:00
Amir Jafarian a73521f161 Allow test folder to be published 2016-03-28 23:32:47 -04:00
Miroslav Bajtoš 1268e0f9ac 2.45.2
* Fix missing connector error msg for db2, cloudant for 2.x (Candy)
2016-02-22 10:43:10 +01:00
Miroslav Bajtoš be9853686d 2.45.1
* Fix conversion for `updateAttributes` (Amir Jafarian)
2016-02-15 10:22:51 +01:00
Miroslav Bajtoš 96588622b8 2.45.0
* Refactor `updateAttributes` (Amir Jafarian)
 * Enhance "persisted" hook in DAO.updateAttributes (Miroslav Bajtoš)
 * Add unit test to verify fix for #754 (Tom Kirkpatrick)
 * Implement `findOrCreate` for memory connector (Amir Jafarian)
 * Fix a bug when validation is off for findOrCreate (Amir Jafarian)
 * Fix broken code fencings in the docs (Farid Nouri Neshat)
 * Revert "Correct syntax for should and more" (Simon Ho)
 * Fix test for shouldjs 8.0.2 upgrade (Simon Ho)
 * Upgrade shouldjs to 8.0.2 (Simon Ho)
 * Correct syntax for should and more (Amir Jafarian)
2016-02-02 19:09:48 +01:00
Simon Ho 95050e3a95 Upgrade shouldjs to 8.0.2 2016-01-20 11:51:47 -08:00
Raymond Feng 1e9bbd2787 2.44.0
* Fix failing test for MongoDB connector (Simon Ho)

 * Make automatic validation optional (Bert Casier)

 * Add refresh script (Simon Ho)

 * Add clean scripts (Simon Ho)

 * Refactor Makefile (Simon Ho)
2015-12-13 11:20:22 -08:00
Simon Ho 48695b711f Merge pull request #776 from strongloop/update-helper-scripts
Update helper scripts
2015-11-27 17:59:09 -08:00
Raymond Feng dbab15554d 2.43.0
* Explicitly initialize column of partition by clause and pass it in find()'s options argument (eugene-frb)

 * Fix for issue #774 (Pradeep Kumar Tippa)

 * silence a warning that introduced in bluebird 3.0 (Clark Wang)

 * fixed a bug where an error was sent to the updateAttributesCallback and then ignored (Abe BW)

 * Capture includeHasMany() as a find()'s caller by findCaller option (eugene-frb)

 * UpdateAttributes: Raises an error if database fails (Wilson Júnior)

 * fixes #753 (Joseph M. Persie)

 * typo fix (nennad)

 * Fix foreignKey length issue (nennad)
2015-11-27 10:48:29 -08:00
Simon Ho 003cb1061f Add refresh script 2015-11-24 22:46:13 -08:00
Simon Ho 70871a5a44 Add clean scripts 2015-11-24 22:46:00 -08:00
Simon Ho 974536c669 Refactor Makefile 2015-11-24 22:45:36 -08:00
Raymond Feng b8fb67beb5 2.42.0
* Correction of a regression introduced by commit 632898b: when querying an empty array ([]) with a 'neq' filter, there were no matching. (Michael Diguet)

 * dropped unused functions and tests fixed (Wert_Lex)

 * One more comment (Wert_Lex)

 * Looks better now (Wert_Lex)

 * home-written map extended with proper .set() method (Wert_Lex)

 * on the halfway to keeping original keys (Wert_Lex)

 * with updated map which stores original key and tests for them (Wert_Lex)

 * Moved inst initialization to place where it used (Wert_Lex)

 * All tests passed (Wert_Lex)

 * Dirty merge. Tests are broken (Wert_Lex)

 * include utils add. Tests ported to should.js (Wert_Lex)
2015-11-23 16:00:29 -08:00
Raymond Feng 84e606bc59 2.41.2
* Fix the typo (Raymond Feng)

 * fix typo (Clark Wang)

 * fix global leak that mocha complains (Clark Wang)

 * Refer to licenses with a link (Sam Roberts)
2015-11-17 13:28:17 -08:00
Raymond Feng 46bdb063c4 2.41.1
* Added missing callback when a model is not found (Federico Rampazzo)

 * Rewrite of variable (mdartic)

 * Filtering relations of a model with an order specified (mdartic)
2015-10-28 10:22:17 -07:00
Miroslav Bajtoš a2ed2a401b 2.41.0
* Ability to define normalization of undefined query (Ryan Schumacher)
 * findByIds would fail when an array of 0 length was passed as its first argument (James Cooke)
 * Use strongloop conventions for licensing (Sam Roberts)
2015-10-07 13:01:13 -07:00
Sam Roberts 4b16e3b0bd Use strongloop conventions for licensing 2015-09-21 16:42:54 -07:00
Raymond Feng 7ede276e44 2.40.1
* Fix the test so that it works across DBs (Raymond Feng)
2015-09-11 11:15:39 -07:00
Raymond Feng 567ffb8040 2.40.0
* Fix id comparision in tests so that they work with mongodb object id (Raymond Feng)

 * Update validations.js (Rand McKinney)

 * Add support for using UUID V4 as defaultFn (Bram Borggreve)

 * primaryKey for hasMany and belongsTo relations (sklyukin)

 * primaryKey to hasOne relation (sklyukin)

 * Add direct copmarison value for array matching (Laurent Villeneuve)

 * Add support for matching array values à la mongo. (Laurent Villeneuve)

 * Fixed ReferencesMany .findById to check the given id in the ids array of the model instance (Satyadeep)
2015-09-10 13:43:58 -07:00
Raymond Feng 0b22e2a2fb 2.39.0
* Optimze automigrate() to cut the test time signicantly (Raymond Feng)

 * Fix primary key checks (Simon Ho)

 * travis: drop 0.6 and 0.8, add iojs (Miroslav Bajtoš)

 * Upgrade Travis to container-based infrastructure (Miroslav Bajtoš)

 * Relax id requirement for basic query operations (Simon Ho)
2015-08-27 16:02:08 -07:00
Raymond Feng 347926ea13 2.38.0
* Support embedded query in memory connector. Fix memory connector bug (Laurent Villeneuve)

 * Use idEquals when comparing ids in relation definitions (Laurent Villeneuve)

 * Handle possible undefined id (Laurent Villeneuve)

 * Fix id copmarison by using strings (Laurent Villeneuve)

 * Refactor idEquals to utils (Raymond Feng)
2015-08-18 14:40:51 -07:00