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
I've Product model that has a brand attribute which is a ForeignKey to Brand model. There are data in the database serving for the appropriate relationship i.e i've products in the database that maps to a brand.
issue
On product listing, i only get the product payload but the relation object is not returned sample response
I'm also interested in the answer for this, though the fact that it hasn't been forthcoming in over a year makes me think perhaps the capability doesn't exist, yet. I do notice that the databases.backends.postgres.Record return type in the result has enumerated columns in its result_columns property, e.g. single_result._result_columns will have a key client_identifier_1 when the child in the relation has a column client_identifier
I've
Product
model that has abrand
attribute which is a ForeignKey toBrand
model. There are data in the database serving for the appropriate relationship i.e i've products in the database that maps to a brand.issue
On product listing, i only get the product payload but the relation object is not returned sample response
I tried same query using
orm.Session
and i attained the desired result with even lesser query see belowsample response i got from the session query
How do i retrieve foreignkey relation using
database
calldatabases == v0.6.2
sqlalchemy == 1.4.34
The text was updated successfully, but these errors were encountered: