Raymond Feng
12a624d99c
Rewrite the List class for typed array
2014-02-14 10:41:00 -08:00
Raymond Feng
7e45a1fda1
Fix the include with array value
2014-02-14 10:40:45 -08:00
Raymond Feng
061b274055
Merge branch 'partial-fix-for-58' of github.com:arlaneenalra/loopback-datasource-juggler
2014-02-12 21:55:53 -08:00
Raymond Feng
dbd97eb423
Merge pull request #68 from strongloop/feature/fix-lb-162
...
Make sure own properties are copied by toObject for non-strict mode
2014-02-11 14:29:21 -08:00
Raymond Feng
85232f31b3
Clean up the options for model constructor
2014-02-10 22:38:59 -08:00
arlaneenalra
5252d0e805
Move new var into thunk.
...
There really was no reason for it to be in the
outer context.
2014-02-05 22:21:27 -06:00
arlaneenalra
abd46961da
Use type converted data when writing back to database.
...
This allows foreignKey types and other custom types
to be converted into natvie values before writing them
to the database.
2014-02-04 23:10:42 -06:00
Ritchie Martori
61a54da418
Merge pull request #65 from strongloop/feature/change-hook
...
Add change / delete events
2014-01-30 13:54:47 -08:00
Ritchie Martori
e909749455
Add tests for change / delete events
2014-01-29 11:03:04 -08:00
Raymond Feng
c008c4d30a
Add more comments
2014-01-28 23:01:11 -08:00
Raymond Feng
43637a690d
Handle hasMany.though
2014-01-28 17:59:59 -08:00
Ritchie Martori
bef1bc1ca4
Add change / delete events
2014-01-28 13:51:45 -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
3d9061aa69
Make the identation consistent for now
2013-12-16 08:40:06 -08:00
Raymond Feng
1b9edbcfcb
Fix a regression in mongodb connector
2013-12-15 22:51:47 -08:00
Raymond Feng
8d1d6f4466
Add more comments
2013-12-15 21:43:21 -08:00
Raymond Feng
9890af119e
Check for null & undefined values
2013-12-14 09:54:28 -08:00
Raymond Feng
fab504b5d9
Fix the coercion issue related to GeoPoint near
2013-12-14 09:49:11 -08:00
Raymond Feng
abe6d2bb22
Add more tests to address the PR comments
2013-12-04 10:00:33 -08:00
Raymond Feng
ed6d8839ba
Add a test case
2013-12-03 21:27:46 -08:00
Raymond Feng
2df0c4b21d
Coerce types for values of where clause
2013-11-29 14:45:50 -08:00
Miroslav Bajtos
f7c48c0d72
REST call of DataAccessObject.findById returns 404
...
Modify the remoting configuration of `DataAccessObject.findById()`
and add a `rest.before` handler that converts `null` to 404 error.
The change is covered by a test in loopback project.
2013-11-21 19:05:52 +01:00
Raymond Feng
526d126e41
Fix the relation lazy setup
2013-11-11 22:06:43 -08:00
Ritchie Martori
597a775e4c
Add model.getDataSource() method
2013-10-31 11:46:12 -07:00
Raymond Feng
9ec9f654c7
Remove undefined values from the query object
2013-10-11 11:50:00 -07:00
Raymond Feng
0bfc362b18
Use for-in loop to support properties from the super class
2013-10-06 21:27:02 -07:00
Raymond Feng
1963ea9fb1
Use ModelDefinition to access model name/properties/settings
2013-10-02 15:18:50 -07:00
Raymond Feng
fad6ee5e1d
Refactor/cleanup the data source juggler implementation
...
- Add a ModelDefinition class to encapsulate the model schema handling
- Add a Connector class as the base class for connector implementations
- Optimize attachTo and mixin
- Rename some properties/methods
2013-10-01 22:14:21 -07:00
Raymond Feng
21e6fddf1a
Check the filter param to make sure we have a default value
...
sls-sample-app is failing if we hit http://localhost:3000/locations/findOne
In this case, a undefined param is passed in.
The fix now sets it to {} if the value is undefined/null
2013-09-06 13:42:12 -07:00
Raymond Feng
038f30cb95
Fix the conflicts between MongoDB _id & juggler's internal prefix
2013-08-30 16:59:17 -07:00
Raymond Feng
84a40cc1c6
Merge pull request #7 from strongloop/SLA-422
...
Mark id arguments to be required
2013-08-30 10:49:16 -07:00
Raymond Feng
c2eb1f55f0
Fix the property population for schemaless models
2013-08-28 21:49:05 -07:00
Raymond Feng
cb00aad473
Mark id arguments to be required
2013-08-27 22:03:59 -07:00
Raymond Feng
59841a04a8
Set strict to false by default for non-relational data sources
2013-08-26 13:38:24 -07:00
Raymond Feng
ecc142b4d2
Disable remoting for reload
2013-08-26 10:54:26 -07:00
Raymond Feng
7234c9822c
Add descriptions for remote method paramters
2013-08-23 17:04:08 -07:00
Raymond Feng
43a5398792
Fix the remote method descriptions
2013-08-23 14:08:47 -07:00
Raymond Feng
6407098126
Update descriptions to use data source
2013-08-22 13:30:13 -07:00
Raymond Feng
a1e4457794
Refactor the shared method declaration and add descriptions
2013-08-22 12:24:02 -07:00
Raymond Feng
9482d3c7de
Fix the where option for delete
2013-08-18 10:58:53 -07:00
Raymond Feng
705a1fc2c9
Update the remote methods
2013-08-16 16:44:31 -07:00
Raymond Feng
281cc38017
Fix the id references to allow custom name other than 'id'
2013-08-14 23:14:44 -07:00
Raymond Feng
8aec0a3b47
Add missing declaration
2013-08-14 17:32:38 -07:00
Raymond Feng
2e20df2dd3
Add docs.json and jsdocs
2013-08-09 15:16:32 -07:00
Raymond Feng
96787ad25f
Fix id references
2013-07-24 22:58:57 -07:00
Ritchie
5bf2d1ff23
Add root true to remote methods
2013-07-24 17:21:35 -07:00
Raymond Feng
752aedb80d
Rename adapters to connectors
2013-07-23 14:40:44 -07:00
Raymond Feng
6af4b1ba2f
More renames: schema -> dataSource, adapter -> connector
2013-07-23 11:16:43 -07:00
Raymond Feng
127fb32d02
Add the id arg
2013-07-22 09:57:55 -07:00
Raymond Feng
b7f7f71b15
Add static deleteById
2013-07-22 09:42:09 -07:00
Ritchie Martori
22db369fb8
Allow queries to filter fields
2013-07-17 09:05:37 -07:00
Ritchie Martori
d4ca20c01a
Add filter.fields support to dao and memory connector
2013-07-16 17:53:52 -07:00
Ritchie Martori
a4247ad59f
Remove updateAttribute as remote method
2013-07-15 19:44:29 -07:00
Raymond Feng
12c28ce363
Fix typos
2013-07-15 10:38:54 -07:00
Raymond Feng
ef671825ff
Only flatten array/object for relational DBs
2013-07-12 19:10:42 -07:00
Raymond Feng
296b258f35
Add http mapping for create/updateAttributes methods
2013-07-11 16:49:18 -07:00
Ritchie Martori
7684fe2946
Change default create method from save to create for remoting
2013-07-02 20:28:00 -07:00
Ritchie Martori
dbd5efed50
Revert adapter serialization. Remove geo point distance indicator.
2013-07-01 13:16:51 -07:00
Ritchie
ce63ef9ac2
Fix global leak and incorrect var
2013-06-27 12:21:31 -07:00
Raymond Feng
64da1d441a
Add alias to destroy/destroyAll
2013-06-25 21:08:34 -07:00
Ritchie Martori
6cb53e5001
Add in memory geo filtering.
2013-06-25 20:31:00 -07:00
Ritchie Martori
008b406dd7
model.find => model.findById, model.all => model.find
2013-06-24 12:42:58 -07:00
Ritchie Martori
7e23393e99
Fixed memory adapter filtering + asteroid compatibility upddates
2013-06-12 15:45:31 -07:00
Raymond Feng
36c22ab972
Adjust the mixins
2013-06-05 14:34:05 -07:00
Ritchie Martori
adf7c49c91
Allow dao.find() and exists() to take any type for id
2013-06-05 07:39:26 -07:00
Ritchie
5f26eba571
Add plural name to models
2013-05-31 10:27:52 -07:00
Raymond Feng
dd8512bc1f
Refactor more functions into mixins
2013-05-27 22:20:43 -07:00
Ritchie Martori
50b2036511
Update remoting signatures for dao.
2013-05-24 15:10:34 -07:00
Ritchie
ae9cb9a6f2
Add pluralized name to model and remoting method signatures
2013-05-24 08:02:58 -07:00
Ritchie
1dee840de5
Add ability to attach data source to an existing model
2013-05-23 16:38:14 -07:00
Raymond Feng
fca91e3400
Fix the on-demand connection
2013-05-17 16:21:12 -07:00
Raymond Feng
630b991d1d
Refactor the CRUD operations to DataAccessObject
2013-05-17 08:49:57 -07:00