Commit Graph

1219 Commits

Author SHA1 Message Date
Raymond Feng 4d7bfc94cd Fix error handling 2015-07-29 10:21:47 -07:00
Raymond Feng c45bde7ccf Merge pull request #647 from PradnyaBaviskar/issue-418-discover
Promisify all 'discover' methods
2015-07-29 07:43:39 -07:00
Raymond Feng ce57234d5e Merge branch 'issue656-findLoadedAsync' of https://github.com/PradnyaBaviskar/loopback-datasource-juggler into PradnyaBaviskar-issue656-findLoadedAsync 2015-07-29 07:33:21 -07:00
Simon Ho 68dc1d821f Remove try/catch from find function 2015-07-28 17:40:14 -07:00
Simon Ho b2b5a0d920 Merge pull request #665 from strongloop/add-regex-support
Add support for RegExp operator
2015-07-28 15:22:02 -07:00
Simon Ho b8f1598723 Add support for regex operator 2015-07-27 15:11:53 -07:00
Pradnya Baviskar de0ca3c61f Async 'loaded' hook for find 2015-07-27 18:58:29 +05:30
Pradnya Baviskar c63f3fb6cb Promisify all 'discover' methods 2015-07-24 12:07:22 +05:30
Raymond Feng b08b6dd954 Merge pull request #650 from PradnyaBaviskar/issue-649
Fix 'persist' hook for updateAttributes()
2015-07-23 08:27:07 -07:00
Pradnya Baviskar 8a20e07b3d Fix 'persist' hook for updateAttributes() 2015-07-23 15:25:50 +05:30
Fabien Franzen a94993c097 Don't enforce strictness if allowExtendedOperators: true (MongoDB) 2015-07-22 17:09:04 +02:00
Fabien Franzen c7caa0a7c1 Take strict: validate and throw settings into account 2015-07-21 13:33:42 +02:00
Fabien Franzen 8b06a9d39d Filter attributes when strict: true 2015-07-20 11:59:07 +02:00
Bryan Clark 342bc2f782 prevent upsert overwriting default values with applyDefaultValues option
Creates a new applyDefaultValues option on the Model constructor
defaulting to true, the current behaviour.

Updates the dao module to pass `{ applyDefaultValues: false }` to the
Model constructor during the updateOrCreate method when we assume an
update is happening.
2015-07-14 09:08:10 -07:00
Bryan Clark 1066313f3f use fromDb to deserialize data after save in Memory connector
Changes the after `save` callback in the memory connector to use the
`fromDb` method to deserialize the data passed back to upsert and
updateAttributes methods.
2015-07-14 09:08:09 -07:00
Fabien Franzen 6ce47f71b4 Correctly handle validatesUniquenessOf(idName) 2015-07-13 12:56:49 +02:00
Raymond Feng 5dc4042300 Fix object merge 2015-07-10 13:54:29 -07:00
Raymond Feng 6eb18cb2f6 Make sure base property definitions are cloned
Sub models sometimes need to customize the properties from the base model.
This change allows each sub model has its own copy of the base property
definition to avoid potential conflicts across multiple sub models of the
same base.
2015-07-10 10:03:51 -07:00
Raymond Feng eb20eebe95 Fix the regression for date conversion 2015-07-03 09:29:26 -07:00
Fabien Franzen 5290559a42 Don't cache static scope method results #575 2015-07-03 10:35:26 +02:00
Raymond Feng 4206088fbc Fix the regexp value for like/nlike 2015-07-02 23:22:36 -07:00
Raymond Feng 542afefb1d Make sure operator/options are honored 2015-07-02 11:27:33 -07:00
Raymond Feng 50ac143cea Merge pull request #652 from strongloop/feature/fix-objectid-coercion
Fix coercion from ObjectID to String
2015-07-02 10:21:03 -07:00
Raymond Feng 506abf134e Merge pull request #642 from rus0000/rus0000-patch-1-fix-updateOrCreate-transaction
Fix updateOrCreate transaction propagation
2015-07-02 10:17:12 -07:00
Raymond Feng e72a3cac2f Merge pull request #643 from rus0000/includes-with-transaction-support
Includes with transaction support
2015-07-02 10:13:49 -07:00
Raymond Feng eb6fa410fe Fix coercion from ObjectID to String 2015-07-01 14:58:14 -07:00
Fabien Franzen ef2555ce4e Fix #623 - use actual id order 2015-06-30 20:48:09 +02:00
Miroslav Bajtoš 293240d752 Merge pull request #599 from PradnyaBaviskar/issue-441
Add new hook 'loaded'
2015-06-24 16:35:50 +02:00
Rus1 13b9e47e87 Includes with transaction support 2015-06-24 02:08:07 +03:00
Rus1 17cac79b09 Fix updateOrCreate transaction propagation 2015-06-23 19:14:36 +03:00
Rus1 ca8012ba0a Fix promise chaining in case of error 2015-06-23 19:08:46 +03:00
Pradnya Baviskar e7430184a9 Promisify 'autoupdate' 2015-06-23 18:02:08 +05:30
Pradnya Baviskar 20cf67d798 Add new hook 'loaded' 2015-06-23 12:04:46 +05:30
Raymond Feng ef50be563f Merge pull request #618 from strongloop/feature/fix-lb-967
Allow 0 as the FK
2015-06-16 08:55:54 -07:00
Raymond Feng bbe9cb350c Merge pull request #626 from walkonsocial/include-issues
Fix for issues #622 & #623
2015-06-16 08:55:29 -07:00
Pradnya Baviskar f4f13a6626 Promisify 'automigrate' 2015-06-16 12:58:21 +05:30
ningsuhen 0d7dcdd043 check object exists before setting __cachedRelations 2015-06-16 11:10:00 +05:30
ningsuhen 052e22ab43 Fix for issues #622 & #623
polymorphic hasOne needs separate handling and hasMany->referencesMany has a unique case which is fixed for MongoDB as suggested by @fabien.
2015-06-12 01:55:25 +05:30
Pradnya Baviskar 3b0e77cb0a Add new hook 'persist' 2015-06-10 16:19:13 +05:30
Raymond Feng 3ee3ba3dcf Allow 0 as the FK
See https://github.com/strongloop/loopback/issues/967
2015-06-08 13:01:16 -07:00
Clark Wang a283922c28 fix typo
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2015-06-01 11:28:58 +08:00
Raymond Feng 493d98f66b Dedupe ids args of inq for include 2015-05-29 10:50:37 -07:00
Raymond Feng e0e6a0cdbb Merge pull request #588 from mamboer/master
fix issue #587
2015-05-28 14:44:11 -07:00
Raymond Feng f789e2abfc Merge pull request #604 from atomic-labs/master
addressing #603
2015-05-28 14:35:58 -07:00
Samuel Reed b73f9f1bd4 Don't silently swallow db errors on validation. 2015-05-28 11:54:01 -05:00
Raymond Feng 46e6ad2fd6 Merge pull request #602 from strongloop/feature/more-tests-for-observers
Enhance the apis and add more tests
2015-05-27 11:08:00 -07:00
Raymond Feng 621adf5435 Enhance the apis and add more tests 2015-05-26 10:15:39 -07:00
mamboer 018022e84b adapt coding style @bajtos 2015-05-26 12:33:56 +08:00
mamboer 69bd7c1233 Merge remote-tracking branch 'upstream/master' 2015-05-26 12:28:11 +08:00
Patrick Perini e63d15aeb5 addressing #603 2015-05-22 13:42:34 -07:00