This is more an inquiry than a bug report. It seems that hierarchical output is only possible when the SELECT statement retrieves the parent's primary key, it's not sufficient to select the child's foreign key.
For example with LanguageFilm, the query must look like (from the docs)
select language.language_id, language.name, film_id, title, release_year
from language
left outer join film on film.language_id = language.language_id
But this query doesn't work, although the SQL response yields the same data:
select film.language_id, language.name, film_id, title, release_year
from language
left outer join film on film.language_id = language.language_id
The output produced by restSQL in this case is a flat list, not the hierarchy produced by the first query.
Is this behavior documented somewhere? I guess I'm supposed to always select the primary keys, but maybe checks could be added if required columns are missing.
This is more an inquiry than a bug report. It seems that hierarchical output is only possible when the SELECT statement retrieves the parent's primary key, it's not sufficient to select the child's foreign key.
For example with LanguageFilm, the query must look like (from the docs)
But this query doesn't work, although the SQL response yields the same data:
The output produced by restSQL in this case is a flat list, not the hierarchy produced by the first query.
Is this behavior documented somewhere? I guess I'm supposed to always select the primary keys, but maybe checks could be added if required columns are missing.