You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a few days of playing around, I finnaly think that it is appropriate that crud methods returns SQLAlchemy objects. The casting to pydantic objects should be done later on by the layers above
I have implemented
City
model (and some extra models for the updates, creations as suggested in the tutorial).DBCity
modelI would like the
crud.get
method to return theCity
model and not theDBCity
.More important, I would like the casting from DBCity to City to be done automatically, with something like
The code above does not make any casting, and behaves as follow:
What do you think of this behavior ?
Wouldn't it be nice to have an auto-casting like the ones of the API ?
The text was updated successfully, but these errors were encountered: