Back

Create a special array

  • 0
  • Databases
Mr.Yoda
1 Dec, 2023, 21:37

Hi. Right now i am creating a small db for my pet project and i need to create a collection of my "products". In each of products i need an array +w some objects, but when i try to add an atribute i have to choose type of it, and i don't see an array, only string->array or int->array. Help me)

TL;DR
The user wants to create a special array for their pet project. They are trying to add an attribute to the products but are unable to find an option for an array type. One possible solution is to use a relationship attribute with a one-to-many relationship.
Mosh Ontong
1 Dec, 2023, 23:35

you said that with some objects? which means your object has properties like color, size, and etc? If this correct I prefer to use relationship attributes and this must be a One to many

Mosh Ontong
1 Dec, 2023, 23:37

A product can contain a many object while object must belong to one product. This makes an array for your relationship

Mr.Yoda
2 Dec, 2023, 09:21

Yes, thanks, it looks like I wanted it to. I will definitely try it today

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