#Bug: Updating a Document with Relationship Field Only Links First Item - pythonsdk

6 messages · Page 1 of 1 (latest)

lyric stirrup
#

I’m experiencing an issue when updating a document that contains a relationship_field. Specifically, when I attempt to add multiple relationships to the array, only the first item is successfully linked, while the others remain empty.

#
cctv_image_ids = ["id1", "id2"]
databases.update_document(
        APPWRITE_DATABASE_ID,
        APPWRITE_COLLECTIONS_ID_OCCURANCES,
        document_id_to_update,
        data={"cctv_images_incoming": cctv_image_ids},
    )
reef hawk
#

Well... Have you confirmed if you update via the SDK and fetch via the SDK, does it show properly?

#

Fyi, relationships are experimental and should be used with caution as they may lead to performance issues

lyric stirrup
#

Problem is, that I get another bug. When fetching via SDK, the query params do not work. Will make another post for this.