Relation not working?

Hi the relations are on the screen the query output is
 sql
SELECT 
    app.id, 
    app.name, 
    app.description, 
    app.created_at, 
    app.updated_at, 
    app.url, 
    app.creator_id, 
    app_creator.data AS creator
FROM 
    app 
LEFT JOIN LATERAL (
    SELECT 
        JSON_ARRAY(
            user.id, 
            user.email, 
            user.role, 
            user.hashed_password, 
            user.firstname, 
            user.lastname, 
            user.created_at, 
            user.updated_at
        ) AS data 
    FROM 
        user 
    WHERE 
        user.id = app.creator_id 
    LIMIT 1
) app_creator ON true;


const result = await db.query.appSchema.findMany({ with: { creator: true } }).toSQL()
this is how i query
image.png
Was this page helpful?