@aws-amplify/datastore 3.7.4-custom-pk.92 → 3.7.4-custom-pk.94
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/dist/aws-amplify-datastore.js +11 -1
- package/dist/aws-amplify-datastore.js.map +1 -1
- package/dist/aws-amplify-datastore.min.js +2 -2
- package/dist/aws-amplify-datastore.min.js.map +1 -1
- package/lib/datastore/datastore.js +8 -0
- package/lib/datastore/datastore.js.map +1 -1
- package/lib/util.d.ts +1 -0
- package/lib/util.js +1 -0
- package/lib/util.js.map +1 -1
- package/lib-esm/datastore/datastore.js +8 -0
- package/lib-esm/datastore/datastore.js.map +1 -1
- package/lib-esm/util.d.ts +1 -0
- package/lib-esm/util.js +1 -0
- package/lib-esm/util.js.map +1 -1
- package/package.json +7 -7
- package/src/datastore/datastore.ts +15 -0
- package/src/util.ts +2 -0
|
@@ -83173,6 +83173,15 @@ function () {
|
|
|
83173
83173
|
});
|
|
83174
83174
|
throw new Error(msg);
|
|
83175
83175
|
}
|
|
83176
|
+
} // observe should not accept object literal syntax
|
|
83177
|
+
|
|
83178
|
+
|
|
83179
|
+
if (identifierOrCriteria && modelConstructor && Object(_types__WEBPACK_IMPORTED_MODULE_11__["isIdentifierObject"])(identifierOrCriteria, getModelDefinition(modelConstructor))) {
|
|
83180
|
+
var msg = _util__WEBPACK_IMPORTED_MODULE_12__["errorMessages"].observeWithObjectLiteral;
|
|
83181
|
+
logger.error(msg, {
|
|
83182
|
+
objectLiteral: identifierOrCriteria
|
|
83183
|
+
});
|
|
83184
|
+
throw new Error(msg);
|
|
83176
83185
|
}
|
|
83177
83186
|
|
|
83178
83187
|
if (identifierOrCriteria !== undefined && modelConstructor === undefined) {
|
|
@@ -97503,7 +97512,8 @@ var __values = undefined && undefined.__values || function (o) {
|
|
|
97503
97512
|
var ID = 'id';
|
|
97504
97513
|
var errorMessages = {
|
|
97505
97514
|
idEmptyString: 'An index field cannot contain an empty string value',
|
|
97506
|
-
queryByPkWithCompositeKeyPresent: 'Models with composite primary keys cannot by queried by a single key value. Use object literal syntax for composite keys instead: https://docs.amplify.aws/lib/datastore/advanced-workflows/q/platform/js/#querying-records-with-custom-primary-keys'
|
|
97515
|
+
queryByPkWithCompositeKeyPresent: 'Models with composite primary keys cannot by queried by a single key value. Use object literal syntax for composite keys instead: https://docs.amplify.aws/lib/datastore/advanced-workflows/q/platform/js/#querying-records-with-custom-primary-keys',
|
|
97516
|
+
observeWithObjectLiteral: 'Object literal syntax cannot be used with observe. Use a predicate instead: https://docs.amplify.aws/lib/datastore/data-access/q/platform/js/#predicates'
|
|
97507
97517
|
};
|
|
97508
97518
|
function extractKeyIfExists(modelDefinition) {
|
|
97509
97519
|
var _c;
|