Back

Not able to use relations in collection

  • 0
  • Web
suraj_markup
9 Oct, 2024, 21:30

I have two collections 'companies' and 'students'. And in students collection I have a relation of companies. Now I'm not able to figure out how I can create new student using relation from code.

this is the interface for companies: interface Company { company_name: string; company_logo?: string; CTC?: string; job_type: string; desc: string; Roles: string; } I've attached the code that I've wrote along with postman response that I'm giving and getting

TL;DR
Issue: Developer is unable to create a new student using relations from the code involving 'companies' and 'students' collections. Solution: Make sure to include the relation field in the new student creation code. Also, double-check the data structure and relationships between the two collections 'companies' and 'students'.
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