On Thu, Jun 25, 2020 at 12:07:40PM -0400, Mike Bayer wrote:
> is "question_choice" a table name? use
> json_agg(literal_column("question_choice"))
Thank you, it works with literal_column() :)
>
>
>
> On Thu, Jun 25, 2020, at 5:38 AM, Julien Cigar wrote:
> > Hello,
> >
> > I'd like to use a
is "question_choice" a table name? use
json_agg(literal_column("question_choice"))
On Thu, Jun 25, 2020, at 5:38 AM, Julien Cigar wrote:
> Hello,
>
> I'd like to use a sql.func.jsonb_agg() with the following
> InstrumentedAttribute:
>
> orm.mapper(
> Question,
Hello,
I'd like to use a sql.func.jsonb_agg() with the following
InstrumentedAttribute:
orm.mapper(
Question, tables['amnesia_phc_registry.question'],
properties={
'choices': orm.relationship(
Choice, back_populates='question'
),
'answers_text':