Connect Loopback to various Data Sources
Go to file
Miroslav Bajtoš e45292de08
Do not apply default values on data from database
Before this change, when a property was configured with a default value
at LoopBack side and the database was returned a record with a missing
value for such property, then we would supply use the configured
default.

This behavior is problematic for reasons explained in #1692.

In this commit, we are fixing DAO operations like `find` and
`findOrCreate` so that they do NOT apply default property values on
data returned by the database (connector).

Please note that most of the other CRUD methods were already not
applying default values on database data as long as the connector
provided native implementation of the operation.
2019-04-04 09:47:31 +02:00
.github Fix stalebot config to ignore "good first issue" 2018-06-14 15:50:21 +02:00
docs Update datasource-connector.md (#1703) 2019-03-28 16:34:35 -04:00
examples autofix eslint errors 2018-12-07 16:46:15 +01:00
intl [WebFM] cs/pl/ru translation (#1600) 2018-06-29 09:37:15 -04:00
lib Do not apply default values on data from database 2019-04-04 09:47:31 +02:00
support autofix eslint errors 2018-12-07 16:46:15 +01:00
test Do not apply default values on data from database 2019-04-04 09:47:31 +02:00
types fix: update typescript declarations 2019-01-31 00:29:35 -05:00
.editorconfig minor formatting issues (trailing spaces and such) and .editorconfig 2015-02-03 13:08:23 +03:00
.eslintignore Add eslint as "npm run lint" and "posttest" hook 2016-04-05 15:25:34 +02:00
.eslintrc Upgrade eslint-config-loopback to latest 2018-12-07 17:09:10 +01:00
.gitignore Add typescript type definitions 2018-05-09 12:47:27 -07:00
.gitmodules Remove unused support/ files 2016-04-05 15:25:34 +02:00
.npmignore Add typescript type definitions 2018-05-09 12:47:27 -07:00
.npmrc Disable package-lock feature of npm 2018-06-12 08:42:05 +02:00
.nycrc Hide nyc coverage from test output 2018-07-10 12:11:46 +02:00
.prettierignore Remove node ref 2018-05-11 09:09:31 -07:00
.prettierrc Remove node ref 2018-05-11 09:09:31 -07:00
.travis.yml Start 4.0 development, drop support for Node 6 2018-10-04 12:07:19 +02:00
CHANGES.md 4.6.0 2019-02-26 14:27:50 -05:00
CODEOWNERS chore: update CODEOWNERS (#1566) 2018-03-22 10:32:28 -04:00
CONTRIBUTING.md Add instructions for running the tests (#1330) 2017-04-17 11:14:00 -04:00
LICENSE chore:update license (#1521) 2017-11-13 12:50:36 -05:00
NOTICE Add NOTICE 2015-07-18 19:44:46 -07:00
README.md Update LTS versions in README 2018-10-08 08:20:12 +02:00
docs.json chore: update file list for apidocs 2018-11-09 11:59:22 -05:00
index.d.ts Add typescript type definitions 2018-05-09 12:47:27 -07:00
index.js autofix eslint errors 2018-12-07 16:46:15 +01:00
package.json fix: update lodash (#1696) 2019-03-01 14:29:56 -05:00
tsconfig.json Add typescript type definitions 2018-05-09 12:47:27 -07:00

README.md

loopback-datasource-juggler

An ORM/ODM that provides a common set of interfaces for interacting with databases, REST APIs, and other types of data sources. It was originally forked from JugglingDB.

Supported versions

This module adopts the Module Long Term Support (LTS) policy, with the following End Of Life (EOL) dates:

Version Status Published EOL
4.x Current Oct 2018 Apr 2021 (minimum)
3.x Active LTS Dec 2016 Dec 2019
2.x Maintenance LTS Jul 2014 Apr 2019

Learn more about our LTS plan in the LoopBack documentation.

Usage

Install Juggler:

npm install loopback-datasource-juggler

Then install a connector:

npm install loopback-connector-mongodb // in this case, the mongodb connector

Documentation

See the LoopBack documentation.

For information on data source connectors, see Connecting models to data sources.