Commit Graph

279 Commits

Author SHA1 Message Date
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
Raymond Feng 84c4d0e922 2.37.0
* Do not coerce RegExp objects to strings (Simon Ho)

 * Indicate result of destroyById/protototype.destroy (Fabien Franzen)

 * Removed extra ")" (Chris Finn)

 * Fixed typo & added the filter units (Chris Finn)
2015-08-14 09:32:18 -07:00
Raymond Feng de5c63fc1e 2.36.0
* Report deferred exceptions via callback (Raymond Feng)

 * fixes issue 673: Include hasMany of relation does not return empty array (Kenta Fried)
2015-08-05 11:19:21 -07:00
Raymond Feng a41fabef70 2.35.3
* Fix the test case with automigrate (Raymond Feng)
2015-07-30 11:25:07 -07:00
Raymond Feng 78bb13db97 2.35.2
* Fix regexp error for the memory connector (Simon Ho)
2015-07-30 09:15:21 -07:00
Raymond Feng ff6a2228f2 2.35.1
* Fix error handling (Raymond Feng)
2015-07-29 10:22:04 -07:00
Raymond Feng b7042b982f 2.35.0
* Remove test for unused utility function (Simon Ho)

 * Remove try/catch from find function (Simon Ho)

 * Add support for regex operator (Simon Ho)

 * Async 'loaded' hook for find (Pradnya Baviskar)

 * Promisify all 'discover' methods (Pradnya Baviskar)

 * Fix 'persist' hook for updateAttributes() (Pradnya Baviskar)
2015-07-29 07:49:56 -07:00
Raymond Feng 5e192bda23 2.34.0
* Don't enforce strictness if allowExtendedOperators: true (MongoDB) (Fabien Franzen)

 * Take strict: validate and throw settings into account (Fabien Franzen)

 * Filter attributes when strict: true (Fabien Franzen)
2015-07-22 08:36:00 -07:00
Raymond Feng 4151302e9e 2.33.3
* Make sure done() is called within the callback (Raymond Feng)
2015-07-21 09:08:56 -07:00
Raymond Feng b9e32bf811 2.33.2
* Add NOTICE (Raymond Feng)

 * prevent upsert overwriting default values with applyDefaultValues option (Bryan Clark)

 * use fromDb to deserialize data after save in Memory connector (Bryan Clark)

 * Correctly handle validatesUniquenessOf(idName) (Fabien Franzen)
2015-07-18 22:28:15 -07:00
Raymond Feng 64b6aef924 2.33.1
* Fix object merge (Raymond Feng)
2015-07-10 14:15:33 -07:00
Raymond Feng 9d653c1a45 2.33.0
* Make sure base property definitions are cloned (Raymond Feng)
2015-07-10 10:40:29 -07:00
Raymond Feng f3b2a97c84 2.32.0
* Fix the regression for date conversion (Raymond Feng)

 * Don't cache static scope method results #575 (Fabien Franzen)
2015-07-03 09:29:58 -07:00
Raymond Feng 88229fb5cf 2.31.1
* Fix the regexp value for like/nlike (Raymond Feng)
2015-07-02 23:22:56 -07:00
Raymond Feng 62a429b2a6 2.31.0
* Assert the existence of instance (Raymond Feng)

 * Make sure operator/options are honored (Raymond Feng)

 * Fix coercion from ObjectID to String (Raymond Feng)

 * Fix #623 - use actual id order (Fabien Franzen)

 * test: fix persistence-hooks failures in MySQL (Miroslav Bajtoš)

 * Includes with transaction support (Rus1)

 * Fix updateOrCreate transaction propagation (Rus1)

 * Fix promise chaining in case of error (Rus1)

 * Promisify 'autoupdate' (Pradnya Baviskar)

 * Add new hook 'loaded' (Pradnya Baviskar)
2015-07-02 14:57:11 -07:00
Raymond Feng 019705d32f 2.30.1
* Ping async to 1.0.0 to work around context propagation (Raymond Feng)

 * Fix the test case (Raymond Feng)
2015-06-16 13:43:28 -07:00
Raymond Feng 8302b2480d Ping async to 1.0.0 to work around context propagation 2015-06-16 13:43:06 -07:00
Raymond Feng 62f3f3af0d 2.30.0
* Promisify 'automigrate' (Pradnya Baviskar)

 * check object exists before setting __cachedRelations (ningsuhen)

 * Fix the test case as updateAll takes `where` directly (Raymond Feng)

 * Fix for issues #622 & #623 (ningsuhen)

 * Add new hook 'persist' (Pradnya Baviskar)

 * Create a script to describe operation hooks (Miroslav Bajtoš)

 * Allow 0 as the FK (Raymond Feng)

 * fix typo (Clark Wang)

 * Dedupe ids args of inq for include (Raymond Feng)
2015-06-16 09:00:08 -07:00
Raymond Feng 56344fe99e 2.29.2
* Fix the test case (Raymond Feng)
2015-05-29 09:29:05 -07:00
Raymond Feng 270fc4c247 2.29.1
* Update deps (Raymond Feng)

 * Don't silently swallow db errors on validation. (Samuel Reed)

 * adapt coding style @bajtos (mamboer)

 * addressing #603 (Patrick Perini)

 * enhancement on #588 (mamboer)

 * fix issue #587 (mamboer)

 * add test suit for scope - dynamic function (Nemo)
2015-05-28 14:53:28 -07:00
Raymond Feng d4d367e786 Update deps 2015-05-28 14:47:43 -07:00
Raymond Feng e8e3ce6688 2.29.0
* Enhance the apis and add more tests (Raymond Feng)

 * Fix for https://github.com/strongloop/loopback/issues/1401 (Raymond Feng)

 * Fix ReferenceError: definition is not defined (Dmitry Manannikov)

 * Mix in observer apis to the connector (Raymond Feng)

 * Enhance fieldsToArray to consider strict mode (Raymond Feng)
2015-05-27 11:09:03 -07:00
Raymond Feng 44bdeb7ae0 2.28.1
* Remove dep on sinon (Raymond Feng)

 * Update deps (Raymond Feng)
2015-05-20 09:14:42 -07:00
Raymond Feng cbb8d7c789 Remove dep on sinon 2015-05-20 09:13:56 -07:00
Raymond Feng 9705819972 Update deps 2015-05-18 14:29:54 -07:00
Raymond Feng 288e6e4c7e 2.28.0
* Make sure promise is returned (Raymond Feng)

 * Update deps to loopback-connector (Raymond Feng)

 * Fix comments (Raymond Feng)

 * Enable docs (Raymond Feng)

 * Add an optional `options` argument to relation methods (Raymond Feng)

 * Add transaction apis (Raymond Feng)

 * Refactor the observer functions into a plugin (Raymond Feng)

 * Add transaction (Raymond Feng)
2015-05-18 14:25:02 -07:00
Raymond Feng 9031400838 Update deps to loopback-connector 2015-05-18 09:36:46 -07:00
Raymond Feng 6ef7dc5914 2.27.1
* Make sure relation scope is applied during include (Raymond Feng)

 * Updated JSdoc for Datasource constructor (crandmck)
2015-05-16 11:51:45 -07:00
Raymond Feng 82ea32f319 2.27.0
* Fix the target id resolution (Raymond Feng)

 * DB Call Optimization in relation includes - Fixes #408 & #166 (ningsuhen)

 * Conditionally pass options to connector CRUD methods (Raymond Feng)

 * Pass-through options from save to create (Fabien Franzen)
2015-05-13 16:14:40 -07:00
ningsuhen d009557a76 DB Call Optimization in relation includes - Fixes #408 & #166 2015-05-14 00:19:43 +05:30
Miroslav Bajtoš d8ecea6111 2.26.4
* dao: support validateUpsert:false (Miroslav Bajtoš)

 * Changes to API docs per Dennis (Rand McKinney)

 * Add unit-test for "array" type (Miroslav Bajtoš)
2015-05-05 17:51:35 +02:00
Raymond Feng ef0a10dbb6 2.26.3
* Fix the test cases (Raymond Feng)

 * Add support for merging include filters (ningsuhen)

 * add test case for hasmanythrough bi-drectional relations (ningsuhen)

 * Fix for bug - https://github.com/strongloop/loopback-datasource-juggler/issues/571 (ningsuhen)
2015-04-24 17:04:00 -07:00
Raymond Feng b0e4312585 2.26.2
* Allow leading slash for `path` in model settings (Raymond Feng)
2015-04-24 08:47:23 -07:00
Miroslav Bajtoš 51265ba26e 2.26.1
* validations: treat `NaN` as a blank value (Miroslav Bajtoš)
2015-04-22 20:13:17 +02:00
Raymond Feng e4c602b098 2.26.0
* Allow custom name mapping for discovered models (Raymond Feng)
2015-04-22 08:44:02 -07:00
Miroslav Bajtoš 2a9a98415a 2.25.1
* Validate model on updateOrCreate (upsert). (Miroslav Bajtoš)
2015-04-17 19:34:37 +02:00
Raymond Feng 0786dc563b 2.25.0
* Extend findById to accept an optional filter object (Raymond Feng)
2015-04-16 11:04:36 -07:00
Miroslav Bajtoš dc54d02485 2.24.0
* Add new strict mode "validate" (Miroslav Bajtoš)

 * Promisify model relation methods (Partap Davis)

 * Deprecate property names containing a dot (Miroslav Bajtoš)

 * Allow nesting properties to be queried for memory connector (Raymond Feng)
2015-04-14 19:10:43 +02:00
Miroslav Bajtoš 0002aaedef 2.23.0
* Fix test for "after save" called on save/CREATE (Miroslav Bajtoš)

 * Code cleanup in lib/dao.js (Miroslav Bajtoš)

 * Save parent model of embedded relations (Fabien Franzen)

 * Pass options in operation hooks context. (Fabien Franzen)

 * check if id does not exist a bit more explicitly (Pulkit Singhal)

 * Fix persistUndefinedAsNull tests w/ SQL connectors (Miroslav Bajtoš)

 * Implement scope.updateAll (Fabien Franzen)

 * Fix the test cases so that they be run with the mssql connector (Raymond Feng)

 * Add model setting "persistUndefinedAsNull" (Miroslav Bajtoš)

 * Add abilities to remove and clear observers - Operation Hooks. (0angelic0)
2015-04-01 18:48:22 +02:00
Miroslav Bajtoš dac1899f59 2.22.0
* Code cleanup in updateAll/deleteAll (Miroslav Bajtoš)

 * Return scope object from DAO.scope (Fabien Franzen)

 * Remove all usages of lodash. (Miroslav Bajtoš)

 * Clean up delete and update tests (Simon Ho)

 * Clean up wording in update/delete tests (Simon Ho)

 * Fix wording in update test (Simon Ho)

 * Properly support embedsMany destroyAll (Fabien Franzen)

 * Clean up update/delete manipulation tests (Simon Ho)

 * test: fix test failure in MySQL connector (Miroslav Bajtoš)

 * Improve test failure messages (Miroslav Bajtoš)

 * Fix regression in prototype.save (Miroslav Bajtoš)

 * Enable more CRUD remoting methods for embedsOne (Fabien Franzen)

 * Implement scope.findOne (Fabien Franzen)

 * use findOrCreate for HasManyThrough#create (Clark Wang)

 * Enhance id comparision for updateAttributes (Raymond Feng)

 * Enable custom methods on singular relations (Fabien Franzen)

 * Implement scope.findById (Fabien Franzen)

 * Fix updateAll callback in "transient" connector (Miroslav Bajtoš)

 * Memory connector returns updated records count (Simon Ho)

 * Add ctx.isNewInstance for "save" hooks (Miroslav Bajtoš)

 * deleteAll returns number of deleted records (Miroslav Bajtoš)

 * Use the correct way to iterate over an array (Raymond Feng)

 * DAO: Fix updateOrCreate to set persisted:true (Miroslav Bajtoš)

 * Reject CREATE with a duplicate id (Miroslav Bajtoš)

 * add tests for between in memory connector (Daniel B. Vasquez)

 * enable between filter for memory db connector (Daniel B. Vasquez)

 * fix #429 Multiple Models can't mixin same class (Clark Wang)
2015-03-27 18:03:08 +01:00
Miroslav Bajtoš 5d8b3323ad Remove all usages of lodash.
This commit is dropping lodash in favour of hand-written implementation
based on ES5 Array methods. As a result, the size of the (unminified)
loopback browser bundle is decreased by approx 360KB.
2015-03-26 09:33:48 +01:00
Raymond Feng 53d694b429 2.21.0
* Fix the test case so that at least one property is to be changed (Raymond Feng)

 * Make sure id properties cannot be changed (Raymond Feng)
2015-03-16 09:54:06 -07:00
Raymond Feng 7dc0fcd26f 2.20.0
* Remove trailing spaces. (Miroslav Bajtoš)

 * Improve instance-level operation hooks (Fabien Franzen)

 * Fix the test case (Raymond Feng)

 * fix foreign key dataType bug (didikeke)

 * Reformat notifyObserversOf context argument (Fabien Franzen)

 * Implement operation hooks' context (Fabien Franzen)

 * Allow submodel to hide base properties (Raymond Feng)
2015-03-12 10:22:05 -07:00
Raymond Feng b7abb08da8 2.19.2
* Improved and corrected API docs (crandmck)

 * Fix problems in annotations that prvented validateAsync and validate functions from appearing in API docs. (crandmck)
2015-03-04 22:19:51 -08:00