David Cheung
805db78e19
Strict mode now always return validationError
...
- Deprecation of strict:validate and strict:throw
- When strict mode is enabled, it will now always
return validation error (previous strict:validate)
2016-09-19 10:27:24 -04:00
Amir Jafarian
aec678d252
Fix manually
2016-08-22 19:20:12 -04:00
Amir Jafarian
aa6d28268b
Auto-update by eslint --fix
2016-08-22 15:12:25 -04:00
Supasate Choochaisri
94c5c18541
Add test to catch invalid date property
...
Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
2016-07-14 17:27:02 +07:00
Miroslav Bajtoš
39e04a1756
eslint --fix
2016-04-05 15:25:34 +02:00
Ryan Graham
c467b43c38
Insert copyright headers
2016-04-04 18:14:03 -07:00
Simon Ho
5d453b5038
Revert "Correct syntax for should and more"
...
This reverts commit 62de2ed69e
.
2015-12-23 15:41:16 -08:00
Amir Jafarian
62de2ed69e
Correct syntax for should and more
...
This fixes lots of failures in connectors
2015-12-16 16:24:48 -05:00
Raymond Feng
682f6340d3
Optimze automigrate() to cut the test time signicantly
2015-08-27 15:59:58 -07:00
Raymond Feng
5ef444e45d
Conditionally pass options to connector CRUD methods
2015-05-13 09:36:45 -07:00
Miroslav Bajtoš
40eecd98c9
validations: treat `NaN` as a blank value
...
When a required number property is set to NaN, for example as a result
of coersion (`Number([1,2,3])`), the "presence" validation now correctly
reports an error.
2015-04-22 19:57:48 +02:00
Miroslav Bajtoš
b66d9fbc54
Fix persistUndefinedAsNull tests w/ SQL connectors
...
Check whether the connector enables strict mode and don't assert on
dynamic properties in such case.
2015-03-30 10:45:55 +02:00
Miroslav Bajtoš
9fd4c00225
Add model setting "persistUndefinedAsNull"
...
When the setting "persistUndefinedAsNull" is true,
the model will use `null` instead of `undefined` in
all property values.
- Known optional model properties are set to `null` when no value
was provided.
- When setting model properties, `undefined` is always converted
to `null`. This applies to both known (model-defined) properties
and additional (custom, dynamic) properties.
- The instance method `toObject()` converts `undefined` to `null` too.
Because `toJSON()` calls `toObject()` under the hood, the change
applies to `toJSON()` too.
2015-03-27 18:25:26 +01:00
Raymond Feng
04348a1168
Make sure id properties cannot be changed
2015-03-16 09:25:38 -07:00
Pradnya Baviskar
be37fb4388
Return 400 when client provides an incorrect value
2015-02-05 16:58:42 +05:30
Miroslav Bajtoš
3593127ef3
Update to `should` to the latest version 4.6.3
2015-02-03 11:44:15 +01:00
Fabien Franzen
a24b222a72
Don't coerce nested objects into Model instances
...
For queries, this is undesirable. It also affects
loopback-connector-mongodb's ability to perform nested queries (it
expects plain objects to work correctly, and to allow $elemMatch for
example).
2015-01-08 15:34:04 +01:00
Raymond Feng
510f5ef6ac
Check the Array type
...
See https://github.com/strongloop/loopback-connector-mongodb/issues/21
2014-03-03 15:52:49 -08:00
Raymond Feng
0d3ce00f35
Simplify the test case
2014-02-12 22:49:54 -08:00
arlaneenalra
99dff35de2
Add unit test for datatype handling in updateAttributes.
2014-02-07 06:50:35 -06:00
Raymond Feng
2b8c1ebaee
Reformat the code
2014-01-24 09:09:53 -08:00
Ritchie Martori
dbd5efed50
Revert adapter serialization. Remove geo point distance indicator.
2013-07-01 13:16:51 -07:00
Ritchie Martori
008b406dd7
model.find => model.findById, model.all => model.find
2013-06-24 12:42:58 -07:00
Anatoliy Chakkaev
c4d4b68413
Datatypes casting
2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev
43f395d653
Manually require init
2013-04-06 14:57:12 +04:00
Anatoliy Chakkaev
9fc4e5e887
Added datatypes tests
2013-04-06 14:34:16 +04:00