@loopback/repository 5.0.0 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/connectors/connector.js +1 -1
- package/dist/connectors/connector.js.map +1 -1
- package/dist/connectors/crud.connector.js +1 -1
- package/dist/connectors/crud.connector.js.map +1 -1
- package/dist/connectors/index.js +1 -1
- package/dist/connectors/index.js.map +1 -1
- package/dist/connectors/kv.connector.js +1 -1
- package/dist/connectors/kv.connector.js.map +1 -1
- package/dist/datasource.js +1 -1
- package/dist/datasource.js.map +1 -1
- package/dist/decorators/index.js +1 -1
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/metadata.js +1 -1
- package/dist/decorators/metadata.js.map +1 -1
- package/dist/decorators/model.decorator.js +1 -1
- package/dist/decorators/model.decorator.js.map +1 -1
- package/dist/decorators/repository.decorator.js +1 -1
- package/dist/decorators/repository.decorator.js.map +1 -1
- package/dist/define-model-class.js +1 -1
- package/dist/define-model-class.js.map +1 -1
- package/dist/define-repository-class.js +1 -1
- package/dist/define-repository-class.js.map +1 -1
- package/dist/errors/entity-not-found.error.js +1 -1
- package/dist/errors/entity-not-found.error.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +2 -2
- package/dist/errors/index.js.map +1 -1
- package/dist/errors/invalid-relation.error.d.ts +1 -1
- package/dist/errors/invalid-relation.error.js +1 -1
- package/dist/errors/invalid-relation.error.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mixins/index.js +1 -1
- package/dist/mixins/index.js.map +1 -1
- package/dist/mixins/repository.mixin.d.ts +49 -50
- package/dist/mixins/repository.mixin.js +1 -1
- package/dist/mixins/repository.mixin.js.map +1 -1
- package/dist/model.d.ts +1 -1
- package/dist/model.js +1 -1
- package/dist/model.js.map +1 -1
- package/dist/relations/belongs-to/belongs-to.accessor.js +1 -1
- package/dist/relations/belongs-to/belongs-to.accessor.js.map +1 -1
- package/dist/relations/belongs-to/belongs-to.decorator.js +1 -1
- package/dist/relations/belongs-to/belongs-to.decorator.js.map +1 -1
- package/dist/relations/belongs-to/belongs-to.helpers.js +2 -2
- package/dist/relations/belongs-to/belongs-to.helpers.js.map +1 -1
- package/dist/relations/belongs-to/belongs-to.inclusion-resolver.js +1 -1
- package/dist/relations/belongs-to/belongs-to.inclusion-resolver.js.map +1 -1
- package/dist/relations/belongs-to/belongs-to.repository.js +1 -1
- package/dist/relations/belongs-to/belongs-to.repository.js.map +1 -1
- package/dist/relations/belongs-to/index.d.ts +2 -2
- package/dist/relations/belongs-to/index.js +3 -3
- package/dist/relations/belongs-to/index.js.map +1 -1
- package/dist/relations/has-many/has-many-through.helpers.js +1 -1
- package/dist/relations/has-many/has-many-through.helpers.js.map +1 -1
- package/dist/relations/has-many/has-many-through.inclusion-resolver.js +1 -1
- package/dist/relations/has-many/has-many-through.inclusion-resolver.js.map +1 -1
- package/dist/relations/has-many/has-many-through.repository-factory.js +1 -1
- package/dist/relations/has-many/has-many-through.repository-factory.js.map +1 -1
- package/dist/relations/has-many/has-many-through.repository.js +1 -1
- package/dist/relations/has-many/has-many-through.repository.js.map +1 -1
- package/dist/relations/has-many/has-many.decorator.js +1 -1
- package/dist/relations/has-many/has-many.decorator.js.map +1 -1
- package/dist/relations/has-many/has-many.helpers.js +2 -2
- package/dist/relations/has-many/has-many.helpers.js.map +1 -1
- package/dist/relations/has-many/has-many.inclusion-resolver.js +1 -1
- package/dist/relations/has-many/has-many.inclusion-resolver.js.map +1 -1
- package/dist/relations/has-many/has-many.repository-factory.js +1 -1
- package/dist/relations/has-many/has-many.repository-factory.js.map +1 -1
- package/dist/relations/has-many/has-many.repository.js +1 -1
- package/dist/relations/has-many/has-many.repository.js.map +1 -1
- package/dist/relations/has-many/index.d.ts +2 -2
- package/dist/relations/has-many/index.js +3 -3
- package/dist/relations/has-many/index.js.map +1 -1
- package/dist/relations/has-one/has-one.decorator.js +1 -1
- package/dist/relations/has-one/has-one.decorator.js.map +1 -1
- package/dist/relations/has-one/has-one.helpers.js +2 -2
- package/dist/relations/has-one/has-one.helpers.js.map +1 -1
- package/dist/relations/has-one/has-one.inclusion-resolver.js +1 -1
- package/dist/relations/has-one/has-one.inclusion-resolver.js.map +1 -1
- package/dist/relations/has-one/has-one.repository-factory.js +1 -1
- package/dist/relations/has-one/has-one.repository-factory.js.map +1 -1
- package/dist/relations/has-one/has-one.repository.js +1 -1
- package/dist/relations/has-one/has-one.repository.js.map +1 -1
- package/dist/relations/has-one/index.js +1 -1
- package/dist/relations/has-one/index.js.map +1 -1
- package/dist/relations/index.js +1 -1
- package/dist/relations/index.js.map +1 -1
- package/dist/relations/references-many/index.d.ts +2 -2
- package/dist/relations/references-many/index.js +3 -3
- package/dist/relations/references-many/index.js.map +1 -1
- package/dist/relations/references-many/references-many.accessor.d.ts +1 -1
- package/dist/relations/references-many/references-many.accessor.js +1 -1
- package/dist/relations/references-many/references-many.accessor.js.map +1 -1
- package/dist/relations/references-many/references-many.decorator.js +1 -1
- package/dist/relations/references-many/references-many.decorator.js.map +1 -1
- package/dist/relations/references-many/references-many.helpers.js +2 -2
- package/dist/relations/references-many/references-many.helpers.js.map +1 -1
- package/dist/relations/references-many/references-many.inclusion-resolver.d.ts +1 -1
- package/dist/relations/references-many/references-many.inclusion-resolver.js +1 -1
- package/dist/relations/references-many/references-many.inclusion-resolver.js.map +1 -1
- package/dist/relations/references-many/references-many.repository.js +1 -1
- package/dist/relations/references-many/references-many.repository.js.map +1 -1
- package/dist/relations/relation.decorator.js +1 -1
- package/dist/relations/relation.decorator.js.map +1 -1
- package/dist/relations/relation.helpers.js +2 -2
- package/dist/relations/relation.helpers.js.map +1 -1
- package/dist/relations/relation.types.js +1 -1
- package/dist/relations/relation.types.js.map +1 -1
- package/dist/repositories/constraint-utils.js +1 -1
- package/dist/repositories/constraint-utils.js.map +1 -1
- package/dist/repositories/index.d.ts +2 -2
- package/dist/repositories/index.js +3 -3
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/kv.repository.bridge.js +1 -1
- package/dist/repositories/kv.repository.bridge.js.map +1 -1
- package/dist/repositories/kv.repository.d.ts +2 -2
- package/dist/repositories/kv.repository.js +1 -1
- package/dist/repositories/kv.repository.js.map +1 -1
- package/dist/repositories/legacy-juggler-bridge.d.ts +1 -1
- package/dist/repositories/legacy-juggler-bridge.js +2 -2
- package/dist/repositories/legacy-juggler-bridge.js.map +1 -1
- package/dist/repositories/repository.js +1 -1
- package/dist/repositories/repository.js.map +1 -1
- package/dist/type-resolver.js +1 -1
- package/dist/type-resolver.js.map +1 -1
- package/dist/types/any.js +1 -1
- package/dist/types/any.js.map +1 -1
- package/dist/types/array.js +1 -1
- package/dist/types/array.js.map +1 -1
- package/dist/types/boolean.js +1 -1
- package/dist/types/boolean.js.map +1 -1
- package/dist/types/buffer.js +1 -1
- package/dist/types/buffer.js.map +1 -1
- package/dist/types/date.js +1 -1
- package/dist/types/date.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/model.js +1 -1
- package/dist/types/model.js.map +1 -1
- package/dist/types/null.js +1 -1
- package/dist/types/null.js.map +1 -1
- package/dist/types/number.js +1 -1
- package/dist/types/number.js.map +1 -1
- package/dist/types/object.js +1 -1
- package/dist/types/object.js.map +1 -1
- package/dist/types/string.js +1 -1
- package/dist/types/string.js.map +1 -1
- package/dist/types/type.js +1 -1
- package/dist/types/type.js.map +1 -1
- package/dist/types/union.js +1 -1
- package/dist/types/union.js.map +1 -1
- package/package.json +13 -13
- package/src/connectors/connector.ts +1 -1
- package/src/connectors/crud.connector.ts +1 -1
- package/src/connectors/index.ts +1 -1
- package/src/connectors/kv.connector.ts +1 -1
- package/src/datasource.ts +1 -1
- package/src/decorators/index.ts +1 -1
- package/src/decorators/metadata.ts +1 -1
- package/src/decorators/model.decorator.ts +1 -1
- package/src/decorators/repository.decorator.ts +1 -1
- package/src/define-model-class.ts +1 -1
- package/src/define-repository-class.ts +1 -1
- package/src/errors/entity-not-found.error.ts +1 -1
- package/src/errors/index.ts +2 -2
- package/src/errors/invalid-relation.error.ts +2 -2
- package/src/index.ts +1 -1
- package/src/mixins/index.ts +1 -1
- package/src/mixins/repository.mixin.ts +1 -6
- package/src/model.ts +2 -2
- package/src/relations/belongs-to/belongs-to.accessor.ts +1 -1
- package/src/relations/belongs-to/belongs-to.decorator.ts +2 -2
- package/src/relations/belongs-to/belongs-to.helpers.ts +2 -2
- package/src/relations/belongs-to/belongs-to.inclusion-resolver.ts +1 -1
- package/src/relations/belongs-to/belongs-to.repository.ts +1 -1
- package/src/relations/belongs-to/index.ts +3 -3
- package/src/relations/has-many/has-many-through.helpers.ts +1 -1
- package/src/relations/has-many/has-many-through.inclusion-resolver.ts +1 -1
- package/src/relations/has-many/has-many-through.repository-factory.ts +1 -1
- package/src/relations/has-many/has-many-through.repository.ts +1 -1
- package/src/relations/has-many/has-many.decorator.ts +1 -1
- package/src/relations/has-many/has-many.helpers.ts +2 -2
- package/src/relations/has-many/has-many.inclusion-resolver.ts +1 -1
- package/src/relations/has-many/has-many.repository-factory.ts +1 -1
- package/src/relations/has-many/has-many.repository.ts +1 -1
- package/src/relations/has-many/index.ts +3 -3
- package/src/relations/has-one/has-one.decorator.ts +1 -1
- package/src/relations/has-one/has-one.helpers.ts +2 -2
- package/src/relations/has-one/has-one.inclusion-resolver.ts +1 -1
- package/src/relations/has-one/has-one.repository-factory.ts +1 -1
- package/src/relations/has-one/has-one.repository.ts +1 -1
- package/src/relations/has-one/index.ts +1 -1
- package/src/relations/index.ts +1 -1
- package/src/relations/references-many/index.ts +3 -3
- package/src/relations/references-many/references-many.accessor.ts +2 -2
- package/src/relations/references-many/references-many.decorator.ts +2 -2
- package/src/relations/references-many/references-many.helpers.ts +2 -2
- package/src/relations/references-many/references-many.inclusion-resolver.ts +2 -2
- package/src/relations/references-many/references-many.repository.ts +1 -1
- package/src/relations/relation.decorator.ts +1 -1
- package/src/relations/relation.helpers.ts +2 -2
- package/src/relations/relation.types.ts +1 -1
- package/src/repositories/constraint-utils.ts +1 -1
- package/src/repositories/index.ts +3 -3
- package/src/repositories/kv.repository.bridge.ts +1 -1
- package/src/repositories/kv.repository.ts +3 -3
- package/src/repositories/legacy-juggler-bridge.ts +2 -2
- package/src/repositories/repository.ts +1 -1
- package/src/type-resolver.ts +1 -1
- package/src/types/any.ts +1 -1
- package/src/types/array.ts +1 -1
- package/src/types/boolean.ts +1 -1
- package/src/types/buffer.ts +1 -1
- package/src/types/date.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/model.ts +1 -1
- package/src/types/null.ts +1 -1
- package/src/types/number.ts +1 -1
- package/src/types/object.ts +1 -1
- package/src/types/string.ts +1 -1
- package/src/types/type.ts +1 -1
- package/src/types/union.ts +1 -1
package/dist/types/number.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017,2019. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/repository
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
package/dist/types/number.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.js","sourceRoot":"","sources":["../../src/types/number.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"number.js","sourceRoot":"","sources":["../../src/types/number.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,wDAAwB;AAGxB,uDAAuD;AAEvD;;GAEG;AACH,MAAa,UAAU;IAAvB;QACW,SAAI,GAAG,QAAQ,CAAC;IA2B3B,CAAC;IAzBC,UAAU,CAAC,KAAU;QACnB,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;IACvE,CAAC;IAED,WAAW,CAAC,KAAU;QACpB,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,YAAY;QACV,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,CAAC,KAAU;QACf,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,KAAK,CAAC;QAChC,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;YACZ,MAAM,GAAG,GAAG,cAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC5D,MAAM,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;SAC1B;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,SAAS,CAAC,KAAgC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA5BD,gCA4BC"}
|
package/dist/types/object.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017,2019. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/repository
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
package/dist/types/object.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.js","sourceRoot":"","sources":["../../src/types/object.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"object.js","sourceRoot":"","sources":["../../src/types/object.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,wDAAwB;AAIxB,uDAAuD;AAEvD;;GAEG;AACH,MAAa,UAAU;IAGrB,YAAmB,IAAc;QAAd,SAAI,GAAJ,IAAI,CAAU;QAFjC,SAAI,GAAG,QAAQ,CAAC;IAEoB,CAAC;IAErC,UAAU,CAAC,KAAU;QACnB,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,YAAY,IAAI,CAAC,IAAI,CAAC;IACrD,CAAC;IAED,WAAW,CAAC,KAAU;QACpB,OAAO,CACL,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CACtE,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,KAAU;QACf,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,KAAK,CAAC;QAChC,IAAI,KAAK,YAAY,IAAI,CAAC,IAAI,EAAE;YAC9B,OAAO,KAAK,CAAC;SACd;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACrD,MAAM,GAAG,GAAG,cAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC5D,MAAM,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;SAC1B;QACD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAC,KAA2B;QACnC,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,KAAK,CAAC;QAChC,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE;YACtC,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;SACvB;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAtCD,gCAsCC"}
|
package/dist/types/string.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017,2019. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/repository
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
package/dist/types/string.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/types/string.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/types/string.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;;AAIhE,uDAAuD;AAEvD;;GAEG;AACH,MAAa,UAAU;IAAvB;QACW,SAAI,GAAG,QAAQ,CAAC;IA4B3B,CAAC;IA1BC,UAAU,CAAC,KAAU;QACnB,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;IACpD,CAAC;IAED,WAAW,CAAC,KAAU;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,KAAU;QACf,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,KAAK,CAAC;QAChC,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE;YACtC,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;SACxB;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;SAC9B;QACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,SAAS,CAAC,KAAgC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA7BD,gCA6BC"}
|
package/dist/types/type.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017,2019. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/repository
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
package/dist/types/type.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/types/type.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/types/type.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE"}
|
package/dist/types/union.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017,2019. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/repository
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
package/dist/types/union.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../src/types/union.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../src/types/union.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,wDAAwB;AAGxB,uDAAuD;AAEvD;;GAEG;AACH,MAAa,SAAS;IACpB,YAAmB,SAAsB;QAAtB,cAAS,GAAT,SAAS,CAAa;QAEhC,SAAI,GAAG,OAAO,CAAC;IAFoB,CAAC;IAI7C,UAAU,CAAC,KAAU;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,WAAW,CAAC,KAAU;QACpB,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,KAAU;QACf,uBAAuB;QACvB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YACjC,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;gBAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aAC3B;SACF;QACD,gBAAgB;QAChB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YACjC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;gBAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aAC3B;SACF;QACD,MAAM,GAAG,GAAG,cAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5D,MAAM,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,SAAS,CAAC,KAAU;QAClB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YACjC,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;gBAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;aAC9B;SACF;IACH,CAAC;CACF;AAzCD,8BAyCC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/repository",
|
|
3
3
|
"description": "Define and implement a common set of interfaces for interacting with databases",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"author": "IBM Corp.",
|
|
9
|
-
"copyright.owner": "IBM Corp.",
|
|
8
|
+
"author": "IBM Corp. and LoopBack contributors",
|
|
9
|
+
"copyright.owner": "IBM Corp. and LoopBack contributors",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/loopbackio/loopback-next.git",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"!*/__tests__"
|
|
34
34
|
],
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@loopback/core": "^4.0.
|
|
36
|
+
"@loopback/core": "^4.0.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@loopback/filter": "^3.0.
|
|
39
|
+
"@loopback/filter": "^3.0.3",
|
|
40
40
|
"@types/debug": "^4.1.7",
|
|
41
41
|
"debug": "^4.3.4",
|
|
42
42
|
"lodash": "^4.17.21",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"tslib": "^2.4.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@loopback/build": "^9.0.
|
|
48
|
-
"@loopback/core": "^4.0.
|
|
49
|
-
"@loopback/eslint-config": "^13.0.
|
|
50
|
-
"@loopback/testlab": "^5.0.
|
|
47
|
+
"@loopback/build": "^9.0.3",
|
|
48
|
+
"@loopback/core": "^4.0.3",
|
|
49
|
+
"@loopback/eslint-config": "^13.0.3",
|
|
50
|
+
"@loopback/testlab": "^5.0.3",
|
|
51
51
|
"@types/bson": "^4.0.5",
|
|
52
52
|
"@types/json-schema": "^7.0.11",
|
|
53
|
-
"@types/lodash": "^4.14.
|
|
54
|
-
"@types/node": "^
|
|
55
|
-
"bson": "4.
|
|
53
|
+
"@types/lodash": "^4.14.184",
|
|
54
|
+
"@types/node": "^14.18.26",
|
|
55
|
+
"bson": "4.7.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "296d9a9577fd058d1a2b2386087686cefa65a7a9"
|
|
58
58
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
package/src/connectors/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
package/src/datasource.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2017,2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
package/src/decorators/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2017,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
package/src/errors/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
6
|
export * from './entity-not-found.error';
|
|
7
|
-
export * from './invalid-relation.error';
|
|
8
7
|
export * from './invalid-polymorphism.error';
|
|
8
|
+
export * from './invalid-relation.error';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {RelationMetadata, RelationType} from '../relations';
|
|
7
7
|
|
|
8
8
|
export class InvalidRelationError<Props extends object = {}> extends Error {
|
|
9
9
|
code: string;
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2017,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
package/src/mixins/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -23,11 +23,6 @@ import {juggler, Repository} from '../repositories';
|
|
|
23
23
|
|
|
24
24
|
const debug = debugFactory('loopback:repository:mixin');
|
|
25
25
|
|
|
26
|
-
// FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867
|
|
27
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
28
|
-
import * as loopbackContext from '@loopback/core';
|
|
29
|
-
import * as loopbackCore from '@loopback/core';
|
|
30
|
-
|
|
31
26
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
32
27
|
|
|
33
28
|
/**
|
package/src/model.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2017,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2017,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
BelongsToDefinition,
|
|
9
9
|
HasManyDefinition,
|
|
10
10
|
HasOneDefinition,
|
|
11
|
-
ReferencesManyDefinition,
|
|
12
11
|
JsonSchema,
|
|
12
|
+
ReferencesManyDefinition,
|
|
13
13
|
RelationMetadata,
|
|
14
14
|
RelationType,
|
|
15
15
|
} from './index';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
6
|
import {DecoratorFactory, MetadataInspector} from '@loopback/core';
|
|
7
7
|
import {property} from '../../decorators';
|
|
8
|
-
import {relation} from '../relation.decorator';
|
|
9
8
|
import {Entity, EntityResolver, PropertyDefinition} from '../../model';
|
|
9
|
+
import {relation} from '../relation.decorator';
|
|
10
10
|
import {BelongsToDefinition, RelationType} from '../relation.types';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -42,7 +42,7 @@ export function resolveBelongsToMetadata(
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const sourceModel = relationMeta.source;
|
|
45
|
-
if (!sourceModel
|
|
45
|
+
if (!sourceModel?.modelName) {
|
|
46
46
|
const reason = 'source model must be defined';
|
|
47
47
|
throw new InvalidRelationError(reason, relationMeta);
|
|
48
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
export * from './belongs-to.decorator';
|
|
7
|
-
export * from './belongs-to.repository';
|
|
8
6
|
export * from './belongs-to.accessor';
|
|
7
|
+
export * from './belongs-to.decorator';
|
|
9
8
|
export * from './belongs-to.inclusion-resolver';
|
|
9
|
+
export * from './belongs-to.repository';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -83,7 +83,7 @@ export function resolveHasManyMetaHelper(
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
const sourceModel = relationMeta.source;
|
|
86
|
-
if (!sourceModel
|
|
86
|
+
if (!sourceModel?.modelName) {
|
|
87
87
|
const reason = 'source model must be defined';
|
|
88
88
|
throw new InvalidRelationError(reason, relationMeta);
|
|
89
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
export * from './has-many.repository-factory';
|
|
7
|
-
export * from './has-many-through.repository-factory';
|
|
8
6
|
export * from './has-many-through.repository';
|
|
7
|
+
export * from './has-many-through.repository-factory';
|
|
9
8
|
export * from './has-many.decorator';
|
|
10
9
|
export * from './has-many.inclusion-resolver';
|
|
11
10
|
export * from './has-many.repository';
|
|
11
|
+
export * from './has-many.repository-factory';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -45,7 +45,7 @@ export function resolveHasOneMetadata(
|
|
|
45
45
|
const targetModelProperties = targetModel.definition?.properties;
|
|
46
46
|
|
|
47
47
|
const sourceModel = relationMeta.source;
|
|
48
|
-
if (!sourceModel
|
|
48
|
+
if (!sourceModel?.modelName) {
|
|
49
49
|
const reason = 'source model must be defined';
|
|
50
50
|
throw new InvalidRelationError(reason, relationMeta);
|
|
51
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
package/src/relations/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
export * from './references-many.decorator';
|
|
7
|
-
export * from './references-many.repository';
|
|
8
6
|
export * from './references-many.accessor';
|
|
7
|
+
export * from './references-many.decorator';
|
|
9
8
|
export * from './references-many.inclusion-resolver';
|
|
9
|
+
export * from './references-many.repository';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -8,9 +8,9 @@ import {DataObject} from '../../common-types';
|
|
|
8
8
|
import {Entity} from '../../model';
|
|
9
9
|
import {EntityCrudRepository} from '../../repositories/repository';
|
|
10
10
|
import {
|
|
11
|
-
ReferencesManyDefinition,
|
|
12
11
|
Getter,
|
|
13
12
|
InclusionResolver,
|
|
13
|
+
ReferencesManyDefinition,
|
|
14
14
|
} from '../relation.types';
|
|
15
15
|
import {resolveReferencesManyMetadata} from './references-many.helpers';
|
|
16
16
|
import {createReferencesManyInclusionResolver} from './references-many.inclusion-resolver';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
6
|
import {DecoratorFactory, MetadataInspector} from '@loopback/core';
|
|
7
7
|
import {property} from '../../decorators';
|
|
8
|
-
import {relation} from '../relation.decorator';
|
|
9
8
|
import {Entity, EntityResolver, PropertyDefinition} from '../../model';
|
|
9
|
+
import {relation} from '../relation.decorator';
|
|
10
10
|
import {ReferencesManyDefinition, RelationType} from '../relation.types';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -43,7 +43,7 @@ export function resolveReferencesManyMetadata(
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const sourceModel = relationMeta.source;
|
|
46
|
-
if (!sourceModel
|
|
46
|
+
if (!sourceModel?.modelName) {
|
|
47
47
|
const reason = 'source model must be defined';
|
|
48
48
|
throw new InvalidRelationError(reason, relationMeta);
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2019,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
StringKeyOf,
|
|
15
15
|
} from '../relation.helpers';
|
|
16
16
|
import {
|
|
17
|
-
ReferencesManyDefinition,
|
|
18
17
|
Getter,
|
|
19
18
|
InclusionResolver,
|
|
19
|
+
ReferencesManyDefinition,
|
|
20
20
|
} from '../relation.types';
|
|
21
21
|
import {resolveReferencesManyMetadata} from './references-many.helpers';
|
|
22
22
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
1
|
+
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/repository
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|