I have a table of users and a table followers with user_id and follower_id
I'm trying to create a view so I can see from a user who users he/she follows and also who follows him/her?
Table users
Table users_followers
id
user_id FK --> users
follower_id FK --> users
To see the followers of a user, I created an array relationship followers on users table
users_followers . user_id → users . id
and then to be able to see who is following a user, I created the following view
CREATE VIEW following_me AS
SELECT u.id as user_id,
u1.*
FROM users u
LEFT JOIN users_followers f ON u.id = f.follower_id
INNER JOIN users u1 ON f.user_id = u1.id;
and then when I try to create a manual relation from the users table to the following_me view as a reference table (users.id --> following_me.user_id), even tho it does appear on the tables dropdown with all the correct fields, when I save, I get and error that says following_me table does not exists