Skip to content

creating tables relationships #1435

Answered by Chadha93
ounced asked this question in Support / Q&A
Discussion options

You must be logged in to vote

Hi @ounced. Answering your questions:

  1. If Algolia doesn't work, you can still create a relationship between the "recipeTags" table and the "recipeList" table using the recipeID. One way to do this is by adding a column in the "recipeTags" table that stores the recipeID from the "recipeList" table. You can then use this column to link the two tables together.

Here's an example of how you can create the relationship using a JavaScript GCP Cloud Function:

const admin = require('firebase-admin');

exports.createRelationship = async (req, res) => {
  const recipeID = req.body.recipeID; // RecipeID to link the tables
  const tagID = req.body.tagID; // ID of the tag in the "recipeTags" table

  t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by BeeBombshell
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants