Commit Graph

88 Commits

Author SHA1 Message Date
crandmck 835708d25d Copy info from api-model.md to JSDoc 2014-05-27 21:59:21 -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
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