-
Hi, i've been trying to make a request work without much success, so i figured i could ask to experts :) i have 2 tables (review and feedback) i'm trying to get all the review that match my current user but that don't have a feedback from that user yet. supabase
.from('reviews')
.select('*, profiles (username)')
.contains('reviewers', [user.id]) so i get the review that contains my user in the the link between the Is it possible currently to do something like this or my data structure is broken for this use case? i also tried to simply add the reviewerid as a foreign key from profile but i get a weird error in my request on reviews after. {"hint":"By following the 'details' key, disambiguate the request by changing the url to /origin?select=relationship(*) or /origin?select=target!relationship(*)",
"details":[{"relationship":"reviews_target_fkey[target][id]",
"origin":"public.reviews","cardinality":"m2o","target":"public.profiles"},
{"relationship":"public.feedback[feedback_reviewid_fkey][feedback_creator_fkey]","origin":"public.reviews","cardinality":"m2m","target":"public.profiles"}],
"message":"More than one relationship was found for reviews and profiles"} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
i manage to get the result i wanted with this request and then in my code i filter the review that have a feedback. supabase
.from('reviews')
.select('*, feedback (rate, content, creator (username), reviews(target(username)) ), target(username)')
.contains('reviews.reviewers', [user.id])
.eq('feedback.creator', user.id) |
Beta Was this translation helpful? Give feedback.
i manage to get the result i wanted with this request and then in my code i filter the review that have a feedback.