I have achieved the perfect recursion without using depth. We should using it at the creation of the database :
db = SQLAlchemy(app, model_class=MyModel)
Cause with we use a mixin and we forgot to use it, if an a class with mixin has a relationship with one without mixin it will create a complicate bug.
And this because we do this test : if issubclass(type(attribute), MyModel)
so if MyModel is a mixin, we might skip the recursive and send back a dict with an object inside !
I have achieved the perfect recursion without using depth. We should using it at the creation of the database :
db = SQLAlchemy(app, model_class=MyModel)
Cause with we use a mixin and we forgot to use it, if an a class with mixin has a relationship with one without mixin it will create a complicate bug. And this because we do this test :if issubclass(type(attribute), MyModel)
so if MyModel is a mixin, we might skip the recursive and send back a dict with an object inside !