select multiple joins
how do you do multiple joins with select on useTable when using supabase?
meta property in the useTable hook when using Supabase. The meta property is used to pass additional information that can be read by data provider methods. categories data of a user using the meta property as shown below:select value in the meta object is used to perform the relational database operation. The select property is used internally by the Supabase data provider methods. Note: you can ask me a follow up question by @ mentioning me again categories to another table, you would use the select property in the meta object of the useTable hook. The select property is used to perform relational database operations in the Supabase data provider.categories to a posts table:select property is set to , which means it will select all fields from the posts table and the name field from the categories table. The categories table is joined to the posts table through the categories field in the posts table.Note: you can ask me a follow up question by @ mentioning me again categories to and another table (let's say ) to categories, you would use the select property in the meta object of the useTable hook. The select property is used to perform relational database operations in the Supabase data provider.select property is set to , which means it will select all fields from the table, the name field from the categories table, and the name field from the table. The categories table is joined to the table through the categories field in the table, and the table is joined to the categories table through the field in the categories table.Note: you can ask me a follow up question by @ mentioning me again movies <-> categories_movies <-> categories"*, categories(name)"moviesmoviesmoviesmoviestagstagstagstags"*, categories(name, tags(name))"const { tableProps, sorter } = useTable<IUser>({
resource: "movies",
meta: {
select: "*, categories!inner(name)",
},
}); const { tableProps, sorter } = useTable<IPost>({
resource: "posts",
meta: {
select: "*, categories(name)",
},
}); const { tableProps, sorter } = useTable<IMovie>({
resource: "movies",
meta: {
select: "*, categories(name, tags(name))",
},
});