Commit Graph

2677 Commits

Author SHA1 Message Date
Tetsuo Seto 100a7ea91c Merge pull request #1319 from strongloop/remove-debug-code
Remove debugger statement
2017-04-07 15:17:58 -07:00
Tetsuo Seto 696e4cfa80 Remove debugger statement 2017-04-07 15:05:15 -07:00
Tetsuo Seto 14d966d159 Merge pull request #1318 from strongloop/fixup-for-cass
Fixup test support for Cassandra connector
2017-04-07 14:31:25 -07:00
Tetsuo Seto 0f9100f185 Fixup test support for Cassandra connector 2017-04-07 14:11:33 -07:00
Tetsuo Seto bff4ea7fd5 Merge pull request #1310 from strongloop/add-cass-tests
Add test support for Cassandra connector
2017-04-07 11:26:48 -07:00
Tetsuo Seto ead1fb2965 Add test support for Cassandra connector 2017-04-07 11:10:47 -07:00
Kevin Delisle 0e946b0cd4 Merge pull request #1311 from strongloop/use-connector-4
package: use loopback-connector@^4.0.0
2017-04-07 11:43:35 -04:00
Kevin Delisle 044f999529 package: use loopback-connector@^4.0.0 2017-04-07 10:50:59 -04:00
Kevin Delisle 00fe8fd59e Merge pull request #1313 from strongloop/revert-1216-fix/geo.nearFilter-deep
Revert ""Near" fix for where clauses"
2017-04-06 18:29:48 -04:00
Sakib Hasan befea83a76 Revert "handle deep geo-near queries (#1216)"
This reverts commit 6f88cf1930.
2017-04-06 17:45:04 -04:00
Sakib Hasan b7e2f2a649 Revert "Allow `after save` hook to see count of records changed (#1231)"
This reverts commit bb3812fbfb.
2017-04-06 17:45:04 -04:00
Joshua Chaitin-Pollak bb3812fbfb Allow `after save` hook to see count of records changed (#1231)
* `after save` hook allows count of records changed

* Fix PR linter
2017-04-06 12:02:34 -04:00
Corentin H 6f88cf1930 handle deep geo-near queries (#1216)
a dedicated mongKey is added in geo.nearFilter for mongoDB
fixes geo min distance tests as filter now expects an array
2017-04-06 08:25:04 -04:00
destillat fc2f66c514 Fix model def column name method (#1224) 2017-04-05 15:12:27 -04:00
Jonathan Sheely 21b08af7a3 Added notify flag for create and upsert (#1277)
* Added notify flag for create and upsert

* Code styling

* More code styling

* Added unit test for notify

* Fix PR linter
2017-04-05 13:23:26 -04:00
Waldemar Zahn ef143dc5eb Custom Table Names on rels (#1303)
hasAndBelongsToMany relation
2017-04-05 12:42:21 -04:00
Sakib Hasan 6a962583b0 Support multiple fk relations (#1308) 2017-04-04 18:23:43 -04:00
Thaer Abbas 57ead01624 #1261 Property name "constructor" is not allowed in 'Model' data (#1284)
* check if data has a constructor prop

* test data with no constructor

* test non function constructor

* test non function ctor message

* cleanup
2017-04-04 13:35:24 -04:00
Raymond Feng 2e6fbadd9e 3.4.1
* Use dataSource.connect to avoid duplicate connects (Raymond Feng)
 * remove equality value for user defined id (#1293) (Matteo Padovano)
2017-04-04 10:29:57 -07:00
Raymond Feng 322fa48267 Merge pull request #1307 from strongloop/feature/mem-connector-connect
Use dataSource.connect to avoid duplicate connects
2017-04-04 10:28:20 -07:00
Raymond Feng 1f995ec674 Use dataSource.connect to avoid duplicate connects 2017-04-04 10:19:58 -07:00
Matteo Padovano 957058e2d4 remove equality value for user defined id (#1293)
Some connector, like arangodb, not support id as Number.
When `forceId` is set to true and id is set `Model.isValid`
report error and the field id is not coerced.
2017-04-04 12:45:23 -04:00
Raymond Feng cac575398d 3.4.0
* Fix in-mem connector file operation racing condition (Raymond Feng)
2017-04-04 08:43:04 -07:00
Raymond Feng 5981197299 Merge pull request #1300 from strongloop/feature/fix-mem-connector
Fix in-mem connector file operation racing condition
2017-04-04 08:41:36 -07:00
Raymond Feng 0a408476ec Fix in-mem connector file operation racing condition 2017-04-04 08:25:15 -07:00
Kevin Delisle 966d5daed7 3.3.0
* make geo nearFilter support minDistance (#987) (Vincent Wen)
 * Disallow regexp string in arrays for coerce (#1279) (Mikhail)
 * Fix - `_targetClass` on scope function (#1280) (Clark Wang)
 * Fixes #1275. `Include` filter transforms fields property into array. (#1276) (Nick Oikonomou)
 * Included models from include operations do not change defined `strict` model option (#1259) (Dimitris)
 * Using a filter with exclusion of a non existent property, removes an existing one (#1257) (Dimitris)
 * Clean version of PR 1272 (#1273) (Sakib Hasan)
 * Replicate new issue_template from loopback (Siddhi Pai)
 * Replicate issue_template from loopback repo (Siddhi Pai)
 * Update README.md (Rand McKinney)
 * FindOrCreate missing error callback (Diana Lau)
 * Fixes #1230 coerceArray converts empty Objects (#1269) (Dimitris)
 * override collection name for arangodb (#1243) (Matteo Padovano)
 * Add test coverage for `validatesInclusionOf` (#1249) (Rémi Bèges)
 * dao: catch errors on Model creation in find (Kevin Delisle)
 * dao: catch sync errors on setAttributes (Kevin Delisle)
 * Update error message (Loay)
 * Fix Order query test case (Loay)
 * Doc:Add option for discoverModelDefinitions (jannyHou)
 * Add tests for validatesExclusionOf (#1248) (Rémi Bèges)
 * Fix id update error message formatting (Rémi Bèges)
 * Add test case for all connectors (jannyHou)
 * Add proper statusCode for duplicate (Loay)
 * Fix datasource to report connector-loading errors (Miroslav Bajtoš)
 * Ensure replaceById returns 404 when id not found (Loay)
 * Upgrade eslint-config, fix new violations (Miroslav Bajtoš)
 * Fix option propagation in relation methods (Miroslav Bajtoš)
 * Refactor logic of options.allowExtendedOperators (Matteo Padovano)
 * Fix forceId validation error (Loay)
 * Add two basic tests for "inq" operator (Miroslav Bajtoš)
2017-03-31 10:28:23 -04:00
siddhipai 539b317ccb Merge pull request #1251 from strongloop/replicate-issue-template
Replicate issue_template from loopback repo
2017-03-28 14:54:15 -07:00
Vincent Wen 8c93710963 make geo nearFilter support minDistance (#987) 2017-03-26 10:04:16 -04:00
Mikhail 68b93e1074 Disallow regexp string in arrays for coerce (#1279)
Disallow regexp arrays for coerce
2017-03-22 20:29:01 -04:00
Clark Wang c99441247c Fix - `_targetClass` on scope function (#1280)
Fix `_targetClass` on scope function when using hasManyThrough
relation with customized relation names and foreignKey/keyThrough.

This bug is cause by `_targetClass` uses the camel-case of
`relationName`(e.g.: if `relationName` is `bbb`, `targetClass`
would be `Bbb`), which is not exists.

This will also suppress "not exposed" warnings when generating
angular sdk, and generate end-points for this scope.
2017-03-22 17:06:36 -04:00
Nick Oikonomou b3a7bc521d Fixes #1275. `Include` filter transforms fields property into array. (#1276)
* Fixes#1275 Transform *fields* property into array

`Include` filter takes into consideration string property
'fields' and transforms it into an array containing this string.

* Added error handling for `include` filter.

* ExecTasksWithInterLeave now contains a try-catch block
 in order to catch any unexpected errors.

* LinkManyToMany now checks if *modelToIdName* exists on
 *target* before continuing.

* Added unit test for *include* with string fields
2017-03-22 10:03:36 -04:00
Dimitris 77c4cd7b01 Included models from include operations do not change defined `strict` model option (#1259)
* Fixes #1252

* Allowed setting of dynamic relation property

* Fixed tests to also consider other connectors
2017-03-20 19:48:57 -04:00
Dimitris 2bfc769c4d Using a filter with exclusion of a non existent property, removes an existing one (#1257)
* #fixes 1256

* Added missing check for returned error

* Fixed test to check proper fields in each doc
2017-03-20 19:18:48 -04:00
Sakib Hasan 3c7e398f6f Clean version of PR 1272 (#1273)
Able to filter out the properties given to a model instead
Of throwing an error
2017-03-20 18:10:01 -04:00
Rand McKinney f1ef519a5c Merge pull request #1236 from strongloop/update-readme
Update README.md
2017-03-20 14:54:39 -07:00
Siddhi Pai 564bbfae12 Replicate new issue_template from loopback 2017-03-20 14:36:59 -04:00
Siddhi Pai ba655ddb8a Replicate issue_template from loopback repo 2017-03-20 14:36:59 -04: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