Skip to content

Commit b9c449b

Browse files
Dane Pilcherdavid-mcafee
authored andcommitted
add note on cpk ff with sqlite (#5146)
* add note on cpk ff with sqlite * use callout blcok Co-authored-by: David McAfee <[email protected]> * use callout block Co-authored-by: David McAfee <[email protected]> --------- Co-authored-by: David McAfee <[email protected]>
1 parent 25f141c commit b9c449b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/fragments/lib/datastore/react-native/getting-started/30_platformIntegration.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To enable SQLite with DataStore for enhanced local database performance, follow
3131
npx [email protected] init AmplifyDataStoreRN --version 0.68.2
3232
cd AmplifyDataStoreRN
3333
npx amplify-app@latest
34-
npm install aws-amplify @aws-amplify/datastore-storage-adapter react-native-sqlite-storage @react-native-community/netinfo @react-native-async-storage/async-storage
34+
npm install aws-amplify @aws-amplify/datastore-storage-adapter react-native-sqlite-storage @react-native-community/netinfo @react-native-async-storage/async-storage
3535
npx pod-install
3636
```
3737

@@ -46,6 +46,12 @@ DataStore.configure({
4646
});
4747
```
4848

49+
<Callout>
50+
51+
The SQLite storage adapter does not currently support custom primary keys.
52+
Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`.
53+
54+
</Callout>
4955
</Block>
5056
<Block name="Expo">
5157

@@ -68,7 +74,7 @@ To enable SQLite with DataStore for enhanced local database performance, follow
6874
expo init AmplifyDataStoreExpo
6975
cd AmplifyDataStoreExpo
7076
npx amplify-app@latest
71-
expo install aws-amplify @aws-amplify/datastore-storage-adapter expo-sqlite expo-file-system @react-native-community/netinfo @react-native-async-storage/async-storage
77+
expo install aws-amplify @aws-amplify/datastore-storage-adapter expo-sqlite expo-file-system @react-native-community/netinfo @react-native-async-storage/async-storage
7278
```
7379

7480
Then configure the SQLite storage adapter with DataStore in your app:
@@ -82,5 +88,11 @@ DataStore.configure({
8288
});
8389
```
8490

91+
<Callout>
92+
93+
The SQLite storage adapter does not currently support custom primary keys.
94+
Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`.
95+
96+
</Callout>
8597
</Block>
8698
</BlockSwitcher>

0 commit comments

Comments
 (0)