Commit Graph

2344 Commits

Author SHA1 Message Date
Amir Jafarian ca766f1437 Implementtaion of replace
This includes:
*implementation of replaceAttributes
*implementtaion of replaceOrCreate
2016-02-04 16:05:11 -05:00
Amir Jafarian dbdf915334 Fix conversion for `updateAttributes` 2016-02-03 12:44:58 -05: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
Amir Jafarian 8ca67c3d48 Refactor `updateAttributes` 2016-01-25 11:15:18 -05:00
Miroslav Bajtoš 5fdd521985 Enhance "persisted" hook in DAO.updateAttributes
Add `isNewInstance:false` to the context reported by
DAO.updateAttributes()
2016-01-25 11:13:34 -05:00
Tom Kirkpatrick 2f71622e11 Add unit test to verify fix for #754 2016-01-22 10:13:05 -08:00
Amir Jafarian 3bc2dacb1b Implement `findOrCreate` for memory connector 2016-01-20 11:51:47 -08:00
Amir Jafarian 2423db1571 Fix a bug when validation is off for findOrCreate 2016-01-20 11:51:47 -08:00
Farid Nouri Neshat 174237e6a6 Fix broken code fencings in the docs 2016-01-20 11:51:47 -08:00
Simon Ho 9b1766f1d5 Revert "Correct syntax for should and more"
This reverts commit 62de2ed69e.
2016-01-20 11:51:47 -08:00
Simon Ho e4719638c7 Fix test for shouldjs 8.0.2 upgrade 2016-01-20 11:51:47 -08:00
Simon Ho 95050e3a95 Upgrade shouldjs to 8.0.2 2016-01-20 11:51:47 -08:00
Amir Jafarian 62de2ed69e Correct syntax for should and more
This fixes lots of failures in connectors
2015-12-16 16:24:48 -05: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 4ce02cbcc1 Merge pull request #789 from strongloop/fix-failing-tests-for-mongodb
Fix failing test for MongoDB connector
2015-12-10 15:20:33 -08:00
Simon Ho 9cfda16194 Fix failing test for MongoDB connector 2015-12-09 12:58:21 -08:00
Miroslav Bajtoš 80c3bd9d41 Merge pull request #752 from ernie58/optionalValidation
make automatic validation optional
2015-12-04 17:03:28 +01:00
Bert Casier 0f3f27af51 Make automatic validation optional
Make automatic validation optional on all CRUD methods in a loopback
model. This can be done in 2 ways

- set `automaticValidation` in the model settings

- set `validate` on the options passed when calling the crud methods

The options take precedence on the model setting.
By default the automatic validation remains true to be backwards
compatible
2015-12-03 16:34:25 +01: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
Raymond Feng bc825fafc4 Merge pull request #755 from zmijevik/zmijevik-feature/include-if-contains-results
fixes #753
2015-11-26 09:33:47 -08:00
Raymond Feng cb776b1354 Merge branch 'wpjunior-fix_update_attributes_error' 2015-11-26 09:31:59 -08:00
Raymond Feng 6f7fc5030a Merge branch 'fix_update_attributes_error' of https://github.com/wpjunior/loopback-datasource-juggler into wpjunior-fix_update_attributes_error 2015-11-26 09:31:40 -08:00
Raymond Feng c071c5687f Merge pull request #775 from pktippa/master
Fix for issue #774
2015-11-26 09:29:44 -08:00
Raymond Feng 3a3cb5b7cb Merge pull request #764 from eugene-frb/master
Capture includeHasMany() as a find()'s caller by findCaller option
2015-11-26 09:29:14 -08:00
Raymond Feng e1f20ee3ea Merge pull request #772 from Abebw/master
Ignored Error
2015-11-26 09:28:50 -08:00
Raymond Feng 486c1de1ba Merge pull request #715 from nennad/master
foreignKey dataLength fix
2015-11-26 09:28:08 -08:00
Raymond Feng 6cfcc4296f Merge pull request #773 from clarkorz/fix/bluebird-v3-warning
silence a warning that introduced in bluebird 3.0.x
2015-11-26 09:26:44 -08:00
eugene-frb ba4600e564 Explicitly initialize column of partition by clause and pass it in find()'s options argument 2015-11-25 13:56:59 -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
Pradeep Kumar Tippa 24808fa772 Merge pull request #1 from pktippa/datasource-connector-doc-fix
Fix for issue #774
2015-11-24 16:51:09 +05:30
Pradeep Kumar Tippa 6a18df4b36 Fix for issue #774 2015-11-24 16:50:41 +05:30
Clark Wang 0ac70766eb silence a warning that introduced in bluebird 3.0
see http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-none-were-returned-from-it

Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2015-11-24 17:15:53 +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 c67922cc59 Merge branch 'wertlex-with-simpe-and-fast-hasmany' 2015-11-23 15:58:19 -08:00
Raymond Feng bd314e6a87 Merge branch 'with-simpe-and-fast-hasmany' of https://github.com/wertlex/loopback-datasource-juggler into wertlex-with-simpe-and-fast-hasmany 2015-11-23 15:21:18 -08:00
Abe BW 0334766490 fixed a bug where an error was sent to the updateAttributesCallback and then ignored 2015-11-23 14:07:35 -05:00
Raymond Feng b6eff7f221 Merge pull request #770 from MichaelDiguet/master
Correction of a regression introduced by commit 632898b
2015-11-23 09:09:33 -08:00
Michael Diguet d8678a1f03 Correction of a regression introduced by commit 632898b: when querying an empty array ([]) with a 'neq' filter, there were no matching. 2015-11-23 17:09:24 +01:00
eugene-frb 96020c7e7e Capture includeHasMany() as a find()'s caller by findCaller option
To replace incorrect location of capturing this condition in find() in
loopback-connector/lib/sql.js  proposed earlier in
https://github.com/strongloop/loopback-connector/pull/34.

Being set to 'includeHasMany', findCaller option triggers injection of
PARTITION BY clause in buildColumnNames() in
loopback-connector-mssql/lib/mssql.js only when find() function is
called to process include filter with 'has many' relation.
2015-11-19 11:10:52 -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 d7bbd7e215 Fix the typo 2015-11-17 13:27:41 -08:00
Wilson Júnior c26b857a87 UpdateAttributes: Raises an error if database fails
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
2015-11-17 17:10:11 -02:00
Joseph M. Persie 5ddb50aca4 fixes #753 2015-11-04 20:13:12 -05:00
Raymond Feng 5ca9c47f44 Merge pull request #751 from clarkorz/fix/global-leak
fix a global leak and two typo
2015-11-03 23:04:38 -08:00
Clark Wang b1b36ed44e fix typo 2015-11-04 14:58:28 +08:00
Clark Wang b993fb9466 fix global leak that mocha complains
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2015-11-04 14:19:47 +08:00
Sam Roberts a27047a966 Refer to licenses with a link 2015-11-03 12:27:49 -08:00