Skip to content

Commit 5acfbbd

Browse files
committed
docs: add composite primary keys reference label and update services documentation to use it, including minor heading style adjustment.
1 parent 65868c6 commit 5acfbbd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/usage/repositories.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ Delete Where
208208
return await repository.delete_where(Post.published.is_(False))
209209
210210
211+
.. _composite-primary-keys:
212+
211213
Composite Primary Keys
212214
----------------------
213215

docs/usage/services.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Services provide high-level methods for common operations:
9393
return post_service.to_schema(post, schema_type=PostResponse)
9494
9595
Composite Primary Keys
96-
~~~~~~~~~~~~~~~~~~~~~~
96+
**********************
9797

9898
Services fully support models with composite primary keys using the same formats as repositories.
9999
Pass primary key values as tuples or dictionaries when using ``get``, ``update``, or ``delete`` methods:
@@ -112,8 +112,7 @@ Pass primary key values as tuples or dictionaries when using ``get``, ``update``
112112
# Delete multiple by composite keys
113113
await user_role_service.delete_many([(1, 5), (1, 6), (2, 5)])
114114
115-
See :ref:`Composite Primary Keys <repositories:Composite Primary Keys>` in the Repositories documentation
116-
for more details on supported formats.
115+
See :ref:`composite-primary-keys` in the Repositories documentation for more details on supported formats.
117116

118117
Complex Operations
119118
-------------------

0 commit comments

Comments
 (0)