Bryce
Bryce
DTDrizzle Team
Created by Bryce on 12/31/2024 in #help
Help with relations - Error: Unknown column in 'where clause'
Here is the raw SQL generated by the query. Executing the SQL directly on the database results in the same error
select `id`, `title`, `createdBy`,
(
select json_array(`userID`, `email`, `name`, `createdAt`, `updatedAt`)
from (
select * from `users` `testTable_creator`
where `testTable_creator`.`userID` = `testTable`.`createdBy`
limit 1
) `testTable_creator`
) as `creator`
from `test` `testTable`
select `id`, `title`, `createdBy`,
(
select json_array(`userID`, `email`, `name`, `createdAt`, `updatedAt`)
from (
select * from `users` `testTable_creator`
where `testTable_creator`.`userID` = `testTable`.`createdBy`
limit 1
) `testTable_creator`
) as `creator`
from `test` `testTable`
10 replies
DTDrizzle Team
Created by Bryce on 12/31/2024 in #help
Help with relations - Error: Unknown column in 'where clause'
The original post has been updated with the corrected schemas
10 replies
DTDrizzle Team
Created by Bryce on 12/31/2024 in #help
Help with relations - Error: Unknown column in 'where clause'
Good catch. I've fixed those issues but I'm still getting the same error
10 replies