r/FastAPI • u/Potential_League_178 • May 16 '22
Question please help me aout fastapi/sqlqlachemy question
https://stackoverflow.com/questions/72258451/how-to-query-a-one-to-many-relationship-in-sqlalchemy-without-duplicates
2
Upvotes
1
u/Ordinary_Bee_1547 May 16 '22
Hi,
Could you perhaps share a bit more of your codebase, e.g. link to Github so it could be cloned and checked more easily?
I only assumed this is the structure for your User class, but I do think you need to add relationship to both Post and Comment class which reference eachother.