Skip to content
Back

Valid and added collection's parameter appears as null when retrieving with react-native-appwrite

  • 0
  • Databases
  • React Native
hen
25 Oct, 2024, 19:19

My collection deals has records with many parameters, one of them is Many to One relationship with another collection sellers. The issue is, when I try to retrieve all deals from the database with js script, I am getting null value in this parameter, where in appwrite console there is set one value from sellers in my deals collection record.

TL;DR
Issue: Retrieving a Many to One relationship parameter in a collection (`deals`) returns null in script, despite having a valid value set in the appwrite console. Solution: Ensure that the code fetching the data is correctly handling the Many to One relationship parameter. Double-check the mapping and retrieval logic to accurately display the `seller` data.
hen
25 Oct, 2024, 19:21

So when I fetch it with appwrite client in my script, seller value is just null in the response

hen
25 Oct, 2024, 19:33

worth noting, that there are other parameters in this collection which are also Many To One and they work correctly in this case

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more