Replies: 2 comments 4 replies
-
|
Yes you can do something like: And it will do the join |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
@aminalaee This works great for me, but is it possible to rename the field label back to "name" instead of "org.name"? Or introduce some column aliases in general? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have Users and Organizations. I would like in the list view for Users to show the Org name, but that name requires a join across the tables.
I am able to get the column to show, but not able to get the values to display. I have tried using sqlalchemy orm add_columns() and reducing the select to not return a model, but instead return specific fields in list_query().
But I see here
sqladmin/sqladmin/models.py
Line 696 in fadf4d6
That 'scalars()' is reducing it back to the Users object.
Is there a suggested way for showing joined values like this?
Beta Was this translation helpful? Give feedback.
All reactions