Access to relationship model
See original GitHub issueHi,
author = Author(name='Chuck Paluhniuk')
book = Book(title='Fight Club', author=author)
session.add(author)
session.add(book)
session.commit()
author_schema.dump(author).data
output model book:
# {'books': [123], 'id': 321, 'name': 'Chuck Paluhniuk'}
how to access to model books if i set list model like ,
lst = ses.query(author ).all()
author_schema.dump(lst).data
output :
# {'books': [123], 'id': 321, 'name': 'Chuck Paluhniuk'}
but i need access to model book?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5
Top Results From Across the Web
How To Open Up The Entity Relationship Diagram In Access
How To Open Up The Entity Relationship Diagram In Access ; Click the Relationships button which can be found in the Relationships group...
Read more >Guide to table relationships
To view your table relationships, click Relationships on the Database Tools tab. The Relationships window opens and displays any existing relationships. If no ......
Read more >How to Make an ERD in Access
An ERD shows a visual representation of primary and foreign keys, which are the columns used to link tables. Microsoft Access includes a...
Read more >How to Create a Database Diagram in Access
Screenshot of Access with the Relationships button highlighted. Launch the Relationships Window. Click Relationships from the Database Tools tab in the Ribbon.
Read more >MS Access Lab 3 Topic: Relationships in ER Diagram and ...
Why Define Relationships? • Relationships in ER Diagram vs. Relationships in MS Access. • Creating Relationships Between Tables. → One-to-Many Relationship ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Change
author_schema.dump(lst).data
to
author_schema.dump(lst, many=True).data
???
@RaminFP Check the Author schema here: http://marshmallow-sqlalchemy.readthedocs.org/en/latest/recipes.html#overriding-generated-fields
Is this what you’re looking for?