Lothar
01/31/2022, 10:22 PMingredients
tableLothar
01/31/2022, 10:23 PMingredients
table has this contentLothar
01/31/2022, 10:23 PMingredient-prints
has thisstabacco
01/31/2022, 10:24 PMLothar
01/31/2022, 10:24 PMLothar
01/31/2022, 10:25 PMLothar
01/31/2022, 10:26 PMAdd foreign key relation
and I chose these valuesLothar
01/31/2022, 10:26 PMSave
and get the initial error I sharedstabacco
01/31/2022, 10:27 PMstabacco
01/31/2022, 10:28 PMLothar
01/31/2022, 10:29 PMAllow Nullable
is not checkedLothar
01/31/2022, 10:31 PMLothar
01/31/2022, 10:31 PMstabacco
01/31/2022, 10:33 PMstabacco
01/31/2022, 10:35 PMmaster
field were not matching any value in the other column from the other table, so the forign key could not resolve proeprlyLothar
01/31/2022, 10:35 PMLothar
01/31/2022, 10:35 PMLothar
01/31/2022, 10:35 PMstabacco
01/31/2022, 10:36 PMLothar
01/31/2022, 10:36 PMLothar
01/31/2022, 10:37 PMLothar
01/31/2022, 10:37 PMLothar
01/31/2022, 10:38 PMlet { data, error, status } = await supabase
.from('ingredient-prints')
.select(`*,
ingredients (key)
`)
.in('token',tokens)
.limit(count)
this, is returning this:
{
"edition": 9,
"sent": null,
"recipient": null,
"from": null,
"token": "7VTYM6wBgv25Hd9KHmTVQpVwqMDkAq6ctWqQDdX63PV7",
"master": "DpPbk6h3UhYkAtZxj6Sxzt2bh9QMiqDN68wn9YaVQpBw",
"ingredients": {
"key": "doom-chalice"
}
}
would it be possible to return it as
{
"edition": 9,
"sent": null,
"recipient": null,
"from": null,
"token": "7VTYM6wBgv25Hd9KHmTVQpVwqMDkAq6ctWqQDdX63PV7",
"master": "DpPbk6h3UhYkAtZxj6Sxzt2bh9QMiqDN68wn9YaVQpBw",
"key": "doom-chalice"
}
?silentworks
01/31/2022, 10:44 PMWill Lutz
02/01/2022, 1:33 AMbernat
02/01/2022, 1:43 AMsql
select p.*
from follows f
join profile p on p.id = f.target_user_id
where f.user_id = '9e7486c7-40f2-41dc-9a4d-467fbe52faee'
I'd love to transform that into a js client select statement. Below is one of my attempts.
js
await supabase
.from('profile')
.select('*, follows!inner(id)')
.eq('follows.user_id', user_id)
Could someone be so kind to help me figure out the exact statement to use? Thanks!
profile.id is a foreign key of user.id
follows.user_id is a foreign key of user.idSubramanya Chakravarthy
02/01/2022, 2:11 AMAmusedGrape
02/01/2022, 3:20 AMAmusedGrape
02/01/2022, 3:21 AMgaryaustin
02/01/2022, 3:45 AM