From 94d71c9e21a847cb959b5d17bad62d78ccf9a423 Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Wed, 22 Feb 2023 14:18:48 -0700 Subject: [PATCH 1/3] add note on cpk ff with sqlite --- .../getting-started/30_platformIntegration.mdx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx b/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx index 53096656661..d900c4c80b9 100644 --- a/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx +++ b/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx @@ -31,7 +31,7 @@ To enable SQLite with DataStore for enhanced local database performance, follow npx react-native@0.68.2 init AmplifyDataStoreRN --version 0.68.2 cd AmplifyDataStoreRN npx amplify-app@latest -npm install aws-amplify @aws-amplify/datastore-storage-adapter react-native-sqlite-storage @react-native-community/netinfo @react-native-async-storage/async-storage +npm install aws-amplify @aws-amplify/datastore-storage-adapter react-native-sqlite-storage @react-native-community/netinfo @react-native-async-storage/async-storage npx pod-install ``` @@ -46,6 +46,9 @@ DataStore.configure({ }); ``` +The SQLite storage adapter does not currently support custom primary keys. +Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`. + @@ -68,7 +71,7 @@ To enable SQLite with DataStore for enhanced local database performance, follow expo init AmplifyDataStoreExpo cd AmplifyDataStoreExpo npx amplify-app@latest -expo install aws-amplify @aws-amplify/datastore-storage-adapter expo-sqlite expo-file-system @react-native-community/netinfo @react-native-async-storage/async-storage +expo install aws-amplify @aws-amplify/datastore-storage-adapter expo-sqlite expo-file-system @react-native-community/netinfo @react-native-async-storage/async-storage ``` Then configure the SQLite storage adapter with DataStore in your app: @@ -82,5 +85,8 @@ DataStore.configure({ }); ``` +The SQLite storage adapter does not currently support custom primary keys. +Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`. + From e5a9895f5981e29923970fd755f085e3325965f1 Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Thu, 23 Feb 2023 12:45:32 -0700 Subject: [PATCH 2/3] use callout blcok Co-authored-by: David McAfee --- .../react-native/getting-started/30_platformIntegration.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx b/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx index d900c4c80b9..d0487f6ef73 100644 --- a/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx +++ b/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx @@ -46,9 +46,12 @@ DataStore.configure({ }); ``` + + The SQLite storage adapter does not currently support custom primary keys. Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`. + From 55372d713f586be99b0556c5c59f20adaefef0e9 Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Thu, 23 Feb 2023 12:45:45 -0700 Subject: [PATCH 3/3] use callout block Co-authored-by: David McAfee --- .../react-native/getting-started/30_platformIntegration.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx b/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx index d0487f6ef73..6063f655f69 100644 --- a/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx +++ b/src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx @@ -88,8 +88,11 @@ DataStore.configure({ }); ``` + + The SQLite storage adapter does not currently support custom primary keys. Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`. +