Fabien Franzen
9f94ec9bde
Minor cleanup
2014-07-26 15:23:40 +02:00
Fabien Franzen
00dfe563eb
Implemented polymorphic hasOne
...
Signed-off-by: Fabien Franzen <info@atelierfabien.be>
2014-07-26 15:20:46 +02:00
Fabien Franzen
295e6fc1f1
Implemented polymorphic hasAndBelongsToMany
2014-07-26 14:54:54 +02:00
Fabien Franzen
9b97e1ae77
Implemented polymorphic hasMany
2014-07-26 12:47:55 +02:00
Miroslav Bajtoš
cd4dba79dc
relation: add `scope._target` for `hasOne`
...
Add `_target` property to the scope method created by `hasOne`
relationship. The `_target` property is used by loopback-sdk-angular.
2014-07-24 20:22:11 +02:00
Fabien Franzen
687eb9888b
Added test for belongsTo scope/properties
...
Note: its seems that keyFrom and keyTo were mistakingly reversed in
BelongsTo.prototype.create, please double check. The added test cases
now pass with pk/fk switched.
2014-07-23 11:10:44 +02:00
Fabien Franzen
bc4076f35e
Implement scope/properties for BelongsTo (+ fix foreign key matching)
2014-07-22 22:09:29 +02:00
Raymond Feng
61d315cb28
Merge pull request #180 from strongloop/feature/refactor-relation-remoting
...
Move relation remoting to loopback
2014-07-22 11:13:07 -07:00
Jaka Hudoklin
b1a1894635
add support for relationship options
...
Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
2014-07-21 22:39:06 +02:00
Raymond Feng
ad22b025a6
Move relation remoting to loopback
2014-07-16 16:36:43 -07:00
Raymond Feng
fc710ca55a
Merge branch 'master' into 2.0
2014-07-15 17:09:20 -07:00
Raymond Feng
ee6da650e9
Test instance or id by the model type
2014-07-15 16:09:54 -07:00
Raymond Feng
f3dbc6ca5f
Remoting methods for hasMany through
2014-07-15 08:50:34 -07:00
Fabien Franzen
48c4f25b09
Renamed mapping to properties
2014-07-12 00:02:16 +02:00
Fabien Franzen
6aaa3f216e
RelationDefinition applyScope/applyMapping
...
Add the ability to set static/dynamic filtering (where, order, limit,
skip, fields …) and property mapping/transfer (de-normalization) for
hasMany/hasOne.
2014-07-11 15:29:47 +02:00
Raymond Feng
4515491318
Make sure type of the foreign key match the primary key
...
See https://github.com/strongloop/loopback/issues/353
2014-06-26 23:38:04 -07:00
Raymond Feng
ce8254125f
Merge branch 'master' into 2.0
2014-06-21 12:53:46 -07:00
Raymond Feng
332579ec87
Synchronize with cachedRelations
2014-06-21 11:44:33 -07:00
Raymond Feng
cbee68706f
Remove remoting metadata
2014-06-20 23:54:46 -07:00
Raymond Feng
177752e144
Add more jsdocs
2014-06-19 11:13:24 -07:00
Raymond Feng
e2ab9ccc93
Adding back the remoting metadata
2014-06-16 13:46:17 -07:00
Raymond Feng
2db43c58e5
Add support for hasOne
2014-06-16 01:17:37 -07:00
Raymond Feng
34c1998f04
Fix the hasMany through connection
2014-06-16 00:36:12 -07:00
Raymond Feng
1406c22a64
Refactor relation into classes
2014-06-15 15:53:58 -07:00