[SOLVED] invalid reference to FROM-clause entry for table
Hi all,
I'm trying to fetch data with some joins from a postgres db.
My query looks like this:
But I always get the error
invalid reference to FROM-clause entry for table "sisu_board"
. If I remove the complete exists
check the error disappears, but I need that check.
What am I doing wrong?1 Reply
Ok I fixed it myself just after asking the question. I was on the right track. I needed to replace the line
eq(schema.SisuBoard.id, schema.SisuBoardMembers.boardId),
with eq(board.id, schema.SisuBoardMembers.boardId),