Fabien Franzen
fafe51833b
More fixes/tests
2014-09-05 17:09:23 +02:00
Fabien Franzen
aebf5e9e6b
Enforce id (prevent user-set value), fix isNewRecord
2014-09-05 16:35:01 +02:00
Raymond Feng
057d39d5bb
Simplify the id lookup
2014-09-04 09:32:38 -07:00
Fabien Franzen
86ea107550
Validations configuration as object
...
Previously validations were appended to an array when configured. The
format was cumbersome, and led to issues. This refactors the
configuration into an object, as a property of the Model.
Note that if no validations have been configured, this property is
currently `undefined`.
2014-08-26 17:51:01 +02:00
Fabien Franzen
3b81b928fb
Implement DAO unsetAttribute
2014-08-20 08:57:20 -07: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
Raymond Feng
7f9108c6d2
Check null
...
See https://github.com/strongloop/loopback-datasource-juggler/issues/223
2014-08-15 23:30:23 -07:00
Fabien Franzen
9f1c5d9c37
Moved DataAccessObject.sortByIds to utils.js
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
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
Raymond Feng
c53dc74d16
Fix a name conflict in scope metadata
2014-08-08 15:52:30 -07:00
Fabien Franzen
b18384459a
Implemented findByIds
2014-07-29 15:01:47 +02:00
Fabien Franzen
da303b72a5
Implemented more complex scenaro: embedsMany + relations
...
The test case will denormalize data into the embedded object,
and re-use the actual related object id as its own id.
2014-07-29 12:02:52 +02:00
Raymond Feng
fc710ca55a
Merge branch 'master' into 2.0
2014-07-15 17:09:20 -07:00
Raymond Feng
dc6ada6348
Merge pull request #165 from strongloop/feature/allow-hook-skip-next
...
Pass callback to hooks so that next can be skipped
2014-07-15 12:53:52 -07:00
Raymond Feng
9325ce316b
Allow before hooks to pass arguments to next()
2014-07-15 12:51:33 -07:00
Samuel Reed
b66183f7dc
DAO.prototype.exists should return 'boolean' type.
...
Signed-off-by: Samuel Reed <samuel.trace.reed@gmail.com>
2014-07-08 15:51:24 -05:00
Miroslav Bajtoš
0296ef113d
Make sure 'deleteById' is used as the remote operation name
...
See strongloop/loopback#359
2014-07-03 08:17:01 +02:00
Raymond Feng
f7afade229
Make sure 'upsert' is used as the remote operation name
...
See https://github.com/strongloop/loopback/issues/359
2014-07-02 12:20:56 -07:00
Raymond Feng
e0c7619908
Normalize filter.order and enforce more checks
2014-06-26 23:40:20 -07:00
Raymond Feng
44de2da21f
Merge branch 'master' into 2.0
2014-06-20 23:02:37 -07:00
Raymond Feng
86073cb480
Merge pull request #144 from strongloop/feature/add-update
...
Feature/add update
2014-06-20 12:28:48 -07:00
Raymond Feng
a1836662a7
Clean up comments
2014-06-20 12:05:32 -07:00
Raymond Feng
26501eaa2e
Merge pull request #135 from albertoleal/ConvertNullToNotFoundError
...
ConvertNulltoNotFoundError when calling DataAccessObject.findOne via rest
2014-06-18 23:00:30 -07:00
Raymond Feng
7c71e1e53b
Merge pull request #141 from strongloop/feature/fix-perf
...
Feature/fix perf
2014-06-18 22:40:00 -07:00
Raymond Feng
888d15ce1c
Optimize model instantiation and conversion
2014-06-18 22:13:52 -07:00
Raymond Feng
ad3af82923
Add support for updating multiple instances with query
2014-06-17 16:30:02 -07:00
Raymond Feng
4b9d98c6ce
Allows skip or offset
...
See https://github.com/strongloop/loopback/issues/336
2014-06-17 09:07:55 -07:00
Alberto Leal
4fd3c969f9
Convert null to NotFoundError for remoting call to DataAccessObject.findOne.
2014-06-11 16:59:21 -03:00
Raymond Feng
bb57fcbe11
Fix the comparison for null/boolean values
2014-06-10 16:11:50 -07:00
Raymond Feng
5f3c856d2e
Fix the logical operator check
2014-06-04 14:23:53 -07:00
Raymond Feng
cdf9956867
Fix JS doc for private methods
2014-06-04 14:02:55 -07:00
Raymond Feng
42c1ad3dca
Normalize/validate the query filter object
2014-06-02 15:57:44 -07:00
crandmck
835708d25d
Copy info from api-model.md to JSDoc
2014-05-27 21:59:21 -07:00
crandmck
00226dde0d
Copy info from api-model.md to JSDoc
2014-05-21 17:50:44 -07:00
Ritchie Martori
dc9c9b2bd4
Remove remoting metadata
2014-05-16 12:33:17 -07:00
Adam Schwartz
49f0e5dcee
Fix typo "Unkown" => "Unknown"
2014-05-15 23:26:17 -04:00
Ritchie Martori
2922eb63b7
Merge
2014-05-14 13:33:46 -07:00
Ritchie Martori
ad752747d3
Add missing changed event
2014-05-14 13:31:15 -07:00
Ritchie Martori
0866a55cb2
Do not .toObject if already Object
2014-05-14 13:31:15 -07:00
Raymond Feng
3f410cae21
Add test cases for updateOrCreate/save and fix related issues
2014-05-09 15:27:45 -07:00
Raymond Feng
0bcbe6ceae
Remove undefined for the data to be saved
2014-05-09 09:59:34 -07:00
Raymond Feng
4a907b0a18
Remove the undefined property to avoid mongodb upsert overwrite
2014-05-08 15:46:39 -07:00
crandmck
cf75f55f73
Fix JSDoc - remove newlines from function alias declarations, etc.
2014-05-07 11:24:49 -07:00
Ritchie Martori
45eadabbeb
Fix remoting for IDs in URLs
2014-05-01 14:19:31 -07:00
Raymond Feng
cc5975486d
Simplify the inclusion processing
2014-03-17 08:40:40 -07:00
Raymond Feng
cadacc44bb
Create scoped methods for belongsTo and improve docs
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
44a62d01af
Allows unknown properties to be saved for non-strict models
...
See https://github.com/strongloop/loopback/issues/199
2014-02-24 18:38:45 -08:00
Raymond Feng
9192c27409
Leave the item type introspection for List
2014-02-14 11:21:30 -08:00