As mentioned by @Goldziher in #1533 there currently isn't support for recursive relationships in PiccoloDTO. This would be a nice feature to have.
from piccolo.columns import ForeignKey, Integer, Varchar
from litestar.dto import DTOConfig
from litestar.contrib.piccolo import PiccoloDTO
class Manager(Table):
name = Varchar(length=100)
class Band(Table):
name = Varchar(length=100)
manager = ForeignKey(references=Manager)
popularity = Integer()
class BandOutputDTO (PiccoloDTO[Band]):
config = DTOConfig(include={"name", "manager.name", "popularity"})
No response
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too