Back

[SOLVED] databases.createRelationshipAttribute is not a function

  • 0
  • Self Hosted
L
3 Jul, 2023, 13:34

Good morning, I'm trying to create the relationships programmatically I'm doing it as it is in the documentation and it gives me this problem: databases.createRelationshipAttribute is not a function I'm using the nodejs sdk

const create_assets_engagement = async () => {

TypeScript
await databases.createCollection("teste", "assets_engagement", "assets_engagement");
await databases.createRelationshipAttribute("teste", "assets_engagement", "assets","oneToOne",true,"asset","assets_engagement","cascade"); */

}

TL;DR
Issue: The function `databases.createRelationshipAttribute` is not recognized in the code. Solution: The issue was resolved by changing the version of `node-appwrite` to `9.0.0`. The user should update their `package.json` file to reflect this change.
Binyamin
3 Jul, 2023, 13:35

What version of node-appwrite you've installed?

Binyamin
3 Jul, 2023, 13:38

In your package.json file

L
3 Jul, 2023, 13:39

node version - v16.16.0 "node-appwrite": "^8.0.0"

Binyamin
3 Jul, 2023, 13:39

Change to 9.0.0 and try again.

L
3 Jul, 2023, 13:44

it worked my friend, I had not paid attention to the version, thank you very much

joeyouss
3 Jul, 2023, 13:57

[CLOSED] databases.createRelationshipAttribute is not a function

Drake
3 Jul, 2023, 15:34

[SOLVED] databases.createRelationshipAttribute is not a function

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