diff --git a/src/pages/[platform]/build-a-backend/data/data-modeling/relationships/index.mdx b/src/pages/[platform]/build-a-backend/data/data-modeling/relationships/index.mdx
index ad8e2b07fa1..35b02122a22 100644
--- a/src/pages/[platform]/build-a-backend/data/data-modeling/relationships/index.mdx
+++ b/src/pages/[platform]/build-a-backend/data/data-modeling/relationships/index.mdx
@@ -439,10 +439,10 @@ do {
-### Handling orphaned foreign keys on parent record deletion in "Has Many" relationship
-
+### Handling orphaned foreign keys on parent record deletion in "Has Many" relationship
+
```ts
// Get the IDs of the related members.
const { data: teamWithMembers } = await client.models.Team.get(
@@ -817,9 +817,8 @@ val cart = Amplify.API.query(
-### Handling orphaned foreign keys on parent record deletion in "Has One" relationship
-
+### Handling orphaned foreign keys on parent record deletion in "Has One" relationship
```ts
// Get the customer with their associated cart