Commit Graph

1591 Commits

Author SHA1 Message Date
Fabien Franzen c2f9ee381c Implement embedded.destroy() integration 2014-08-15 15:24:00 +02:00
Fabien Franzen 21801058c9 Refactor embedsMany - auto-save parent
With this change, saving an embedded model now correctly updates the
parent model.

Before, a separate `save()` call on the parent was required, contrary
to other relation types.
2014-08-15 15:12:02 +02:00
Fabien Franzen c3c2c85ce4 Refactor polymorphic relations, fix inverse #215
See #215 - when creating a related item through a the inverse of a
polymorphic HABTM relation,
the through-model was not created correctly. By refactoring the
specifics into the `polymorphic`
property of a RelationDefinition, it's now possible to handle this
correctly.
2014-08-15 12:55:10 +02:00
Fabien Franzen 35850f6632 Clarified tests, fixed BelongsTo.prototype.create
Added clarified test-case based on previous documentation example.

Fixed BelongsTo.prototype.create - although the foreignKey was set on
the model instance,
it was never actually persisted, unless you'd issue a separate call to
save the 'parent' model.
2014-08-15 11:28:25 +02:00
Fabien Franzen 89e0566467 Fix conflicts 2014-08-14 20:18:08 +02:00
Fabien Franzen cd3ad32bb7 Fix formatting 2014-08-14 20:12:17 +02:00
Fabien Franzen 7d847f25dc Fix scopeMethods closure issue 2014-08-14 20:12:17 +02:00
Fabien Franzen a67759dcbf Refactored embedsMany (relationName vs. propertyName) 2014-08-14 20:12:16 +02:00
Fabien Franzen a243d05880 Enable DL definition of embedsMany + referencesMany 2014-08-14 20:12:16 +02:00
Miroslav Bajtoš 6ea6f19752 Merge pull request #209 from fabien/fix/refactor-modelto
Refactor modelTo
2014-08-14 20:00:24 +02:00
Fabien Franzen 807a6aaf3f Refactor modelTo logic into lookupModelTo 2014-08-14 19:43:30 +02:00
Miroslav Bajtoš 12514b01d0 Merge pull request #210 from fabien/fix/embeds-many
Tiny fix: use setAttributes
2014-08-14 18:55:00 +02:00
Fabien Franzen e6c9de02e2 Remove redundant test 2014-08-14 17:13:58 +02:00
Fabien Franzen f2025c3995 Allow partial list of ids for sortByIds 2014-08-14 09:40:03 +02:00
Fabien Franzen d7555bfb64 Allow runtime override of scope/relation order query param 2014-08-13 16:24:11 +02:00
Fabien Franzen 710ad35b39 Implement scope.defineMethod/relation.defineMethod 2014-08-13 11:28:23 +02:00
Fabien Franzen 29e4314ec0 Fix formatting 2014-08-13 10:10:34 +02:00
Jaka Hudoklin 0d44cdc573 add count to relations
Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
2014-08-12 14:44:33 +02:00
Rand McKinney 4cb22793e2 Fix links to confluence docs 2014-08-11 11:42:21 -07:00
Fabien Franzen 3b398c5f77 Fix scopeMethods closure issue 2014-08-11 19:07:48 +02:00
Fabien Franzen dd9ea68f47 Refactored embedsMany (relationName vs. propertyName) 2014-08-11 15:33:41 +02:00
Fabien Franzen f2c349b5b3 Enable DL definition of embedsMany + referencesMany 2014-08-11 14:43:51 +02:00
Fabien Franzen 93fab448bc Tiny fix: use setAttributes 2014-08-11 13:03:51 +02:00
Fabien Franzen 5a18839053 Merge branch 'master' into fix/refactor-modelto 2014-08-10 17:21:35 +02:00
Fabien Franzen 1724f350de Refactor modelTo logic into lookupModelTo 2014-08-10 17:08:31 +02:00
Fabien Franzen d1466bffcb Cleanup mixin tests 2014-08-09 10:58:03 +02:00
Raymond Feng c3f7a7acb5 Merge tag 'v2.3.1'
2.3.1
2014-08-08 15:54:32 -07:00
Raymond Feng a848628db8 Merge branch 'release/2.3.1' into production 2014-08-08 15:54:23 -07:00
Raymond Feng c53dc74d16 Fix a name conflict in scope metadata 2014-08-08 15:52:30 -07:00
Raymond Feng a48d2fdfeb Merge tag 'v2.3.0'
2.3.0
2014-08-08 09:45:38 -07:00
Raymond Feng 82475b58af Merge branch 'release/2.3.0' into production 2014-08-08 09:45:32 -07:00
Raymond Feng 950be998bc Fix the test case so that it works with other DBs 2014-08-08 09:39:36 -07:00
Raymond Feng 366ff3bf62 Bump version 2014-08-08 09:30:16 -07:00
Raymond Feng caff62d8b3 Merge branch 'fabien-feature/plugins' 2014-08-08 09:29:17 -07:00
Raymond Feng 3d5ec63c99 Pass options into scope 2014-08-08 09:25:49 -07:00
Raymond Feng 7fe7bf9b9a Add scope definitions to the model class
See https://github.com/strongloop/loopback/issues/454
2014-08-08 09:01:24 -07:00
Raymond Feng f671c9c726 Clean up the mixin processing 2014-08-08 01:20:57 -07:00
Raymond Feng 55ff28206f Merge branch 'feature/plugins' of github.com:fabien/loopback-datasource-juggler into fabien-feature/plugins 2014-08-07 22:51:25 -07:00
Raymond Feng 0adf440cd1 Merge pull request #203 from lchenay/patch-5
Fix bug when using multiple include keys on related method
2014-08-07 17:01:46 -07:00
Raymond Feng 327f142a89 Merge tag 'v2.2.2'
2.2.2
2014-08-07 10:37:35 -07:00
Raymond Feng 695078df78 Merge branch 'release/2.2.2' into production 2014-08-07 10:37:29 -07:00
Raymond Feng 3efd758658 Bump version 2014-08-07 10:36:49 -07:00
Raymond Feng 1cb4ea2ff0 Upgrade qs 2014-08-07 10:35:13 -07:00
Laurent 71398518ff Fix bug when using multiple include keys 2014-08-06 20:40:24 +02:00
Fabien Franzen 35776311fd Unified plugins into mixins
Mixin types: module function, module object, LDL json object.
2014-08-06 13:26:47 +02:00
Fabien Franzen 455ee9ec63 Fix typo: loadPlugin(s) 2014-08-05 16:28:17 +02:00
Fabien Franzen f1f692a8a5 Minor touch-ups 2014-08-05 16:26:34 +02:00
Fabien Franzen 1a4e8863ef Basic plugin architecture
Similar to http://mongoosejs.com/docs/plugins.html

Next, loopback-boot should be updated to support loading plugins from
dirs.
2014-08-05 16:16:10 +02:00
Raymond Feng 5a2bb6548a Upgrade qs version 2014-08-04 16:37:21 -07:00
Raymond Feng 1ec502404b Merge tag 'v2.2.1'
2.2.1
2014-08-04 15:36:09 -07:00