`ModelBuilder` and recursive foreign keys
Closed this issue · 0 comments
dantownsend commented
If you have a foreign key which references its own table:
class MyTable(Table):
fk = ForeignKey("self")
You get an error when using ModelBuilder
:
>>> await ModelBuilder.build(MyTable)
Max recursion error!
If the foreign key is nullable, we can set the value to None
, to avoid an infinite loop.