Commit Graph

48 Commits

Author SHA1 Message Date
Miroslav Bajtoš 093a69328c Insert copyright headers 2016-04-06 16:51:49 +02: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
Zack Bloom dd4089d1c7 Fix bug where invalid relations in include filters would hang the server 2014-05-13 13:59:15 -04:00
Raymond Feng 68d2696248 Fix the method for belongsTo with correct receiver 2014-04-03 20:41:53 -07:00
Raymond Feng 0e7acec591 Set the relation property correctly
See https://github.com/strongloop/loopback/issues/218
2014-03-23 21:07:04 -07:00
Raymond Feng cc5975486d Simplify the inclusion processing 2014-03-17 08:40:40 -07:00
crandmck 9c2098cd35 Updates to JSDoc comments for API doc 2014-03-12 16:28:46 -07:00
Raymond Feng 93c18163c8 Make sure __cachedRelations is not enumerable 2014-01-28 09:57:23 -08:00
Raymond Feng 1339250c8f Promote the included relations as properties 2014-01-27 15:56:04 -08:00
Raymond Feng 2b8c1ebaee Reformat the code 2014-01-24 09:09:53 -08:00
Raymond Feng 05eae4aa3e Replace all with find to make it consistent 2013-11-18 11:39:07 -08:00
Raymond Feng dd8512bc1f Refactor more functions into mixins 2013-05-27 22:20:43 -07:00
Raymond Feng 630b991d1d Refactor the CRUD operations to DataAccessObject 2013-05-17 08:49:57 -07:00
Anatoliy Chakkaev c15ff3cad0 Safer include 2013-05-13 22:04:29 -07:00
Anatoliy Chakkaev 136ea91fbf Organize model.js 2013-05-13 22:04:28 -07:00