Rank 5: Hypervisor
I have script for 18K doc but there are some other Doc for which I haven't wrote script
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 5: Hypervisor
I have script for 18K doc but there are some other Doc for which I haven't wrote script
Rank 5: Hypervisor
I guess, let me try again from fresh because relation-ship part is crirtical so for that I can try
Rank 5: Hypervisor
jsut complted creating everything from scratch and seems still issue with Upadting Doc
I'll need exact steps to try and reproduce
Rank 5: Hypervisor
yaa sure, I can share the json file but it's huge ( 1000+ line)
Rank 5: Hypervisor
Rank 5: Hypervisor
this is the exact json, and then I am not sure how would you able to test updating from Client 🤔
Rank 5: Hypervisor
because from the console it will work
do you have minimal reproduction steps for creating hte documents and whatnot?
Rank 5: Hypervisor
umm, I haven't back-traced it I mean, there is nested relatinship so that is not de-coupled
i really need a way to reproduce the problem...
Rank 5: Hypervisor
I mean, this version I shared will reproduce it but It's not minimal that's the issue
Rank 5: Hypervisor
just need tp deploy the collection, and create the document for Business Collection and then for the create document for,
Company
Brand
Currency
Unit
HSN-Code
Product
Product Varaint
Inventory <--------------- while trying to update this issue is happening...
Inventory Log
here, 1, 2, 3 represent relationship depth
im not sure if it will if i don't have the steps for the document creation
sorry i don't understand these steps
Rank 5: Hypervisor
umm, I could one thing just write a simple function
Rank 5: Hypervisor
but, only thing I am not sure is how would you test the update ?
Rank 5: Hypervisor
any comment on this one?
you can share a sample api request for an update...or give some instructions
im going to spin it up and try and make the request
Rank 5: Hypervisor
I guess request need to be made from the client side... but let me first share small script to populate the data
Rank 5: Hypervisor
can I share the script tomorrow morning. It's almost 1:36AM and feeling dazy brain seems to stop working, I am almost done with script just few twicks needing
Rank 5: Hypervisor
trying to write script to update the relationship,
appwrite | [Error] Method: PATCH
appwrite | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
appwrite | [Error] Type: Exception
appwrite | [Error] Message: Invalid value for relationship
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
appwrite | [Error] Line: 2995
appwrite | [Error] Timestamp: 2023-07-13T06:37:19+00:00
appwrite | [Error] Method: PATCH
appwrite | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
appwrite | [Error] Type: Exception
appwrite | [Error] Message: Invalid value for relationship
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
appwrite | [Error] Line: 2995
appwrite | [Error] Timestamp: 2023-07-13T06:37:48+00:00
appwrite | [Error] Method: PATCH
appwrite | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
appwrite | [Error] Type: Exception
appwrite | [Error] Message: Invalid value for relationship
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
appwrite | [Error] Line: 2995
getting this exception
what are you passing? what's your code?
Rank 5: Hypervisor
I am trying to write script to share with you, and it's quite mess because it's in python and written in hurry.
Btw, I was trying to update the id ( i mean trying to linked the one doc with another)