Answer the question
In order to leave comments, you need to log in
PostgreSQL. How to put JOINs into a subarray?
Hello. The bottom line is... let's say there is a categories table with columns ( id , alias , title ), and an articles table ( id , alias , title , text , category ), where category is dependent on the categories table by id . How to properly execute a query to get an object of this type:
{
id: 1,
alias: "testarticle",
title: "Заголовок",
text: "Тест записи"
category: {
id: 1,
alias: "testcat"
title: "Заголовок категории"
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question