Commit Graph

63 Commits

Author SHA1 Message Date
Tetsuo Seto c07f46000d Support include rework for C* connector
- Remove supportNonPrimaryKeyIN
- Add C* Uuid in build call
- Implement smartMerge in scope.js
2017-05-12 22:43:21 -07: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
Miroslav Bajtoš 454bf93aaf Upgrade eslint-config to 7.x
Also upgrade eslint itself to 3.x.
2017-01-06 13:33:54 +01:00
jannyHou 6c8e806bc8 Apply hasManyThrough filter on target model 2016-12-01 10:08:27 -05:00
Amir Jafarian aec678d252 Fix manually 2016-08-22 19:20:12 -04:00
Amir Jafarian aa6d28268b Auto-update by eslint --fix 2016-08-22 15:12:25 -04:00
Amir Jafarian d181fd0671 Fixup globalization 2016-08-08 15:34:41 -04:00
Horia Radu c3f62991c3 Optimize related model queries
No longer query for the related/included model when no results are
obtained in the first query.

fix:
https://github.com/strongloop/loopback-datasource-juggler/issues/1006
2016-08-01 20:23:08 +03:00
Amir Jafarian 4ce5b5d3a0 Support for globalization 2016-07-28 15:20:18 -04:00
Rand McKinney f1ed1ee023 Update include.js
Change doc comments to remove spurious API doc entry per #1008
2016-07-25 08:48:47 -07:00
Miroslav Bajtoš c7f34c3452 eslint config 2.0 + remove extra empty lines
Upgrade eslint-config-loopback to ^2.0.0.

Remove extra empty lines to make `npm run lint` pass again.
2016-04-19 16:11:43 +02:00
Raymond Feng 84da11f98e Partition by foreign key for pagination
See https://github.com/strongloop/loopback-datasource-juggler/issues/610
2016-04-05 17:21:48 -07:00
Miroslav Bajtoš 27c6279d6c fix remaining eslint issues 2016-04-05 15:25:34 +02:00
Miroslav Bajtoš 39e04a1756 eslint --fix 2016-04-05 15:25:34 +02:00
Ryan Graham c467b43c38 Insert copyright headers 2016-04-04 18:14:03 -07: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 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
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
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
Joseph M. Persie 5ddb50aca4 fixes #753 2015-11-04 20:13:12 -05:00
Wert_Lex 638002bc59 Looks better now 2015-10-30 21:15:48 +06:00
Wert_Lex 1cab0164c2 home-written map extended with proper .set() method 2015-10-10 21:00:00 +05:00
Wert_Lex a5dd9c181a on the halfway to keeping original keys 2015-10-10 19:37:39 +05:00
Wert_Lex 7b497eb58f Moved inst initialization to place where it used 2015-08-25 15:46:50 +03:00
Wert_Lex 84dc39dfe2 All tests passed 2015-08-24 20:45:41 +03:00
Wert_Lex fb56915371 Dirty merge. Tests are broken 2015-08-24 16:07:43 +03:00
Kenta Fried 90ee9a1af3 fixes issue 673: Include hasMany of relation does not return empty array 2015-07-31 14:47:22 -07:00
Raymond Feng e72a3cac2f Merge pull request #643 from rus0000/includes-with-transaction-support
Includes with transaction support
2015-07-02 10:13:49 -07:00
Fabien Franzen ef2555ce4e Fix #623 - use actual id order 2015-06-30 20:48:09 +02:00
Rus1 13b9e47e87 Includes with transaction support 2015-06-24 02:08:07 +03:00
ningsuhen 0d7dcdd043 check object exists before setting __cachedRelations 2015-06-16 11:10:00 +05:30
ningsuhen 052e22ab43 Fix for issues #622 & #623
polymorphic hasOne needs separate handling and hasMany->referencesMany has a unique case which is fixed for MongoDB as suggested by @fabien.
2015-06-12 01:55:25 +05:30
Raymond Feng 493d98f66b Dedupe ids args of inq for include 2015-05-29 10:50:37 -07:00
Raymond Feng a028b2644c Fix for https://github.com/strongloop/loopback/issues/1401 2015-05-22 11:39:37 -07:00
Raymond Feng 93a0342099 Add an optional `options` argument to relation methods 2015-05-16 11:52:17 -07:00
Raymond Feng eac74ad014 Make sure relation scope is applied during include 2015-05-16 11:49:02 -07:00
Raymond Feng b5b7bab096 Fix the target id resolution 2015-05-13 16:10:07 -07:00
ningsuhen d009557a76 DB Call Optimization in relation includes - Fixes #408 & #166 2015-05-14 00:19:43 +05:30
Raymond Feng 14dcfb61be Add support for multiple includes that use relation syntax 2014-11-04 20:45:25 -08:00
Fabien Franzen 55d116ec3f Enable include scope for belongsTo 2014-10-14 22:47:59 +02:00
Fabien Franzen 8d6e3adaab Allow include syntax without scope param 2014-10-10 17:17:36 +02:00
Fabien Franzen 771d9505cc Allow 'rel' and 'relation' 2014-10-10 14:33:26 +02:00
Fabien Franzen 0c28ccedac Refactored inclusion
The syntax is now consistent, regardless of using [] or {} for the
include param.
2014-10-10 14:24:25 +02:00
Fabien Franzen ca0b3399c8 Implement include scopes 2014-10-10 12:28:39 +02:00
Fabien Franzen a446551a59 Fix relations for RDBMS connectors (mysql, postgresql)
- fix tests (explicit model/property definitions)
- fix include vs. RDBMS model strictness
2014-08-20 14:03:38 +02:00
Fabien Franzen 60fd39d311 Added option: reference to enable embedsMany add/remove 2014-07-29 17:43:30 +02:00
Fabien Franzen 13cee9502c Tests for polymorphic embedsMany 2014-07-29 13:57:49 +02:00
Jaka Hudoklin 11679beb14 add support for disabling relationship includes
Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
2014-07-21 22:39:29 +02:00
crandmck 893768e895 Add hooks and include mixins 2014-06-18 16:42:00 -07:00