Fabien Franzen
2c40319585
Fix conflicts
2014-08-15 19:43:07 +02:00
Fabien Franzen
9f1c5d9c37
Moved DataAccessObject.sortByIds to utils.js
2014-08-15 19:39:58 +02:00
Fabien Franzen
c599de42cd
Remove redundant test
2014-08-15 19:39:58 +02:00
Fabien Franzen
085bb94505
Allow partial list of ids for sortByIds
2014-08-15 19:39:58 +02:00
Raymond Feng
8743d75999
Merge pull request #222 from fabien/fix/relation-tests
...
Fixed duplicate code
2014-08-15 10:15:11 -07:00
Fabien Franzen
0e348b0333
Fixed duplicate code
2014-08-15 18:51:19 +02:00
Raymond Feng
03d94a86e5
Merge pull request #219 from fabien/fix/relation-tests
...
Fix BelongsTo.prototype.create + remaining issues with new relation types
2014-08-15 09:46:27 -07:00
Fabien Franzen
6b0bbed780
Merge branch 'fix/relation-tests' of https://github.com/fabien/loopback-datasource-juggler into fix/relation-tests
2014-08-15 18:43:20 +02:00
Fabien Franzen
94310549cf
Implement embedded.destroy() integration
2014-08-15 18:41:06 +02:00
Fabien Franzen
96a276a12b
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 18:40:33 +02:00
Raymond Feng
62db2155e4
Merge pull request #212 from offlinehacker/relations_count
...
add count to relations
2014-08-15 09:37:50 -07:00
Fabien Franzen
8193f402bb
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 18:35:31 +02:00
Fabien Franzen
78e2c9c9d4
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 18:35:31 +02:00
Raymond Feng
d7900a8a21
Merge pull request #211 from fabien/fix/relationTypes
...
Fix relationTypes
2014-08-15 09:29:22 -07:00
Raymond Feng
e22389967c
Merge pull request #214 from fabien/fix/scope-order
...
Allow runtime override of scope/relation order query param
2014-08-15 09:25:17 -07:00
Raymond Feng
da4482d1cf
Merge pull request #213 from fabien/feature/scope-rel-methods
...
Implement scope.defineMethod/relation.defineMethod
2014-08-15 09:24:24 -07:00
Raymond Feng
6cd2cbc99a
Merge pull request #205 from fabien/feature/plugins
...
Cleanup mixin tests
2014-08-15 09:22:49 -07:00
Raymond Feng
97306037e3
Merge pull request #221 from fabien/fix/updateAttributes
...
Handle toObject in updateAttributes
2014-08-15 09:10:21 -07:00
Fabien Franzen
7cd880712b
Handle toObject in updateAttributes
...
Since one can call updateAttributes with any kind of properties (as
opposed to save, which uses toObject internally), any objects that
correspond to toObject should be handled as such. This is particularly
the case with List objects, as used by embedsMany.
2014-08-15 18:01:40 +02:00
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