You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we have the ability to do “preloading” in a single query? We can get data in a single query in the form of Postgresql lateral join (select Array(...query)). If Gorm supports this, it would be really perfect for me :)
Expected answer
select f.*, array_to_json(questions.list) fromsurvey.forms f
left join lateral(
select Array(
select to_jsonb(*) fromsurvey.form_items fi wherefi.form_id=f.id
) as list
) questions on true;
The text was updated successfully, but these errors were encountered:
Your Question
Do we have the ability to do “preloading” in a single query? We can get data in a single query in the form of Postgresql lateral join (select Array(...query)). If Gorm supports this, it would be really perfect for me :)
Expected answer
The text was updated successfully, but these errors were encountered: