fastcrud
fastcrud copied to clipboard
Add Relationship Support in Auto Generated Endpoints
Does FastCRUD work with relationship in SQLAlchemy?
class Car(Base):
brand_id = Column(Integer, ForeignKey("car_brands.id"), nullable=False)
body_type_id = Column(Integer, ForeignKey("car_body_types.id"), nullable=False)
body_type = relationship("CarBodyType", backref="cars")
brand = relationship("CarBrand", backref="cars")
Description If you use get_multi, then a list is displayed without support for models that belong to this model
Additional context The expectation was that if you add a relationship to the SQLalchemy model, then this relationship will also appear in the list after get_multi