Rank 3: Container
does relationship property working the same as adding FK in another collection
Votes
0
Replies
13
Participants
Unknown
Messages
14
Rank 3: Container
does relationship property working the same as adding FK in another collection
Rank 3: Container
await databases.CreateRelationshipAttribute(
databaseId: "marvel",
collectionId: "movies",
relatedCollectionId: "reviews",
type: "oneToMany",
twoWay: true,
key: "reviews",
twoWayKey: "movie",
onDelete: "cascade");
Rank 3: Container
what is twoWay mean?
Yes
Have you read the docs? https://appwrite.io/docs/products/databases/relationships#directionality
Rank 3: Container
I have read , missing some part ?
What do you mean?
Rank 3: Container
I dont see the explanation of twoWay
Did you not see this?
Rank 3: Container
😂 nope
Rank 3: Container
so two way, it means creating from either side is the same right
Not exactly. It won't be the same for many to one or one to many. And on delete is different
Rank 3: Container
oh, I tested, it is just way to config, if the info to be shown in both collection or only one collection of the relationship