I’m not able to detect a related table from a call here is what I am doing.
My data is in a MySQL db
From the API docs I run /tablename/_schema/{table_name}
The resulting response shows this:
“related”: [],
However this table is related to three other tables. The table structure is this
id | schedule_id | member_id | role_id
schedule_id is related to another table called “schedules” so it relates like this:
this table schedule_id = schedule table id
Since it doesn’t detect the related table I am unable to pull data from multiple tables.
Is there away I can manually tell the call that this table = another one? I’ve read on the docs that a stored procedure is the way to accomplish this but I thought maybe there was an easier way in 2.2
Ultimately I want to make one call and get data from more than two tables and indicate what data I’d like.
In an sql query it b something like this:
SELECT DISTINCT b.date_schedule, b.time_type, a.first_name, a.last_name, c.name
FROM dr_persons a
iNNER JOIN dr_schedules b
iNNER JOIN dr_types c
I saw there is a “related data when relationships don’t exist” post and it says it’s not possible but I’m not sure if it now is in 2.2 Any help would be great, thank you
UPDATE: I actually did this using data mesh. Virtual relations